This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import wraps | |
def call_before(before_func, *args, **kwargs): | |
def call_before_decorator(func): | |
@wraps(func) | |
def wrapping(*args2, **kwargs2): | |
before_func(*args, **kwargs) | |
return func(*args2, **kwargs2) | |
return wrapping |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" Simple youtube downloader """ | |
import re | |
import sys | |
import requests | |
import urllib | |
def youtube_info(youtube_id): | |
""" Raises ValueError when video is not streamable - e.g. VEVO video """ | |
info_url = 'http://www.youtube.com/get_video_info?video_id={0}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import re | |
import subprocess | |
import sys | |
modified = re.compile('^(?:M|A)(\s+)(?P<name>.*)') | |
CHECKS = [ |