mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-20 18:27:46 +01:00
Merge branch 'master' of github.com:rg3/youtube-dl
This commit is contained in:
commit
34ae0f9d20
@ -190,6 +190,8 @@ def _find_term_columns():
|
|||||||
general.add_option('--dump-user-agent',
|
general.add_option('--dump-user-agent',
|
||||||
action='store_true', dest='dump_user_agent',
|
action='store_true', dest='dump_user_agent',
|
||||||
help='display the current browser identification', default=False)
|
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',
|
general.add_option('--list-extractors',
|
||||||
action='store_true', dest='list_extractors',
|
action='store_true', dest='list_extractors',
|
||||||
help='List all supported extractors and the URLs they would handle', default=False)
|
help='List all supported extractors and the URLs they would handle', default=False)
|
||||||
@ -370,6 +372,9 @@ def _real_main():
|
|||||||
jar.load()
|
jar.load()
|
||||||
except (IOError, OSError), err:
|
except (IOError, OSError), err:
|
||||||
sys.exit(u'ERROR: unable to open cookie file')
|
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
|
# Dump user agent
|
||||||
if opts.dump_user_agent:
|
if opts.dump_user_agent:
|
||||||
|
Loading…
Reference in New Issue
Block a user