diff options
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r-- | youtube_dl/__init__.py | 12 |
1 files changed, 10 insertions, 2 deletions
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'] |