X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2F__init__.py;h=3b3a9a4f494d099c1a00d00900f83549d379e65c;hb=234e230c8781ed46013a6a26d56c4b1dcbe57e69;hp=8817228f31ea9bd9073189a5980d2f56bbf30d44;hpb=3a68d7b467d59e6df4d8473989dcd9edb460dd75;p=youtube-dl diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 8817228f3..3b3a9a4f4 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -19,7 +19,7 @@ __authors__ = ( ) __license__ = 'Public Domain' -__version__ = '2012.02.27' +__version__ = '2012.09.27' UPDATE_URL = 'https://raw.github.com/rg3/youtube-dl/master/youtube-dl' UPDATE_URL_VERSION = 'https://raw.github.com/rg3/youtube-dl/master/LATEST_VERSION' @@ -190,6 +190,8 @@ def parseOpts(): general.add_option('--dump-user-agent', action='store_true', dest='dump_user_agent', help='display the current browser identification', default=False) + general.add_option('--user-agent', + action='store', dest='useragent', help='specify a custom user agent') general.add_option('--list-extractors', action='store_true', dest='list_extractors', help='List all supported extractors and the URLs they would handle', default=False) @@ -338,6 +340,7 @@ def gen_extractors(): YahooSearchIE(), DepositFilesIE(), FacebookIE(), + BlipTVUserIE(), BlipTVIE(), VimeoIE(), MyVideoIE(), @@ -350,6 +353,8 @@ def gen_extractors(): MixcloudIE(), StanfordOpenClassroomIE(), MTVIE(), + YoukuIE(), + XNXXIE(), GenericIE() ] @@ -367,7 +372,10 @@ def _real_main(): jar.load() except (IOError, OSError), err: sys.exit(u'ERROR: unable to open cookie file') - + # Set user agent + if opts.useragent is not None: + std_headers['User-Agent'] = opts.useragent + # Dump user agent if opts.dump_user_agent: print std_headers['User-Agent']