X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=youtube_dl%2Foptions.py;h=11603f60d6c9a1f5aff35a15927a7d1db2521802;hb=ae849ca1701dc5bdf25e648a57a1e6ec64f2f968;hp=d861ac458146d6241441575d7356e4926152b237;hpb=4a3cdf81af9c22c45912b0b4c5845531d52d3a0c;p=youtube-dl.git diff --git a/youtube_dl/options.py b/youtube_dl/options.py index d861ac458..11603f60d 100644 --- a/youtube_dl/options.py +++ b/youtube_dl/options.py @@ -606,7 +606,7 @@ def parseOpts(overrideArguments=None): '%(format)s for the format description (like "22 - 1280x720" or "HD"), ' '%(format_id)s for the unique id of the format (like YouTube\'s itags: "137"), ' '%(upload_date)s for the upload date (YYYYMMDD), ' - '%(extractor)s for the provider (YouTube, metacafe, etc), ' + '%(extractor)s for the provider (youtube, metacafe, etc), ' '%(id)s for the video id, ' '%(playlist_title)s, %(playlist_id)s, or %(playlist)s (=title if present, ID otherwise) for the playlist the video is in, ' '%(playlist_index)s for the position in the playlist. ' @@ -626,7 +626,7 @@ def parseOpts(overrideArguments=None): filesystem.add_option( '-A', '--auto-number', action='store_true', dest='autonumber', default=False, - help='[deprecated; use -o "%(autonumber)s-%(title)s.%(ext)s" ] Number of downloaded files starting from 00000') + help='[deprecated; use -o "%(autonumber)s-%(title)s.%(ext)s" ] Number downloaded files starting from 00000') filesystem.add_option( '-t', '--title', action='store_true', dest='usetitle', default=False, @@ -670,7 +670,7 @@ def parseOpts(overrideArguments=None): filesystem.add_option( '--load-info', dest='load_info_filename', metavar='FILE', - help='Specify JSON file containing the video information (created with the "--write-json" option)') + help='JSON file containing the video information (created with the "--write-info-json" option)') filesystem.add_option( '--cookies', dest='cookiefile', metavar='FILE', @@ -794,21 +794,22 @@ def parseOpts(overrideArguments=None): if opts.verbose: write_string('[debug] Override config: ' + repr(overrideArguments) + '\n') else: - command_line_conf = sys.argv[1:] - # Workaround for Python 2.x, where argv is a byte list - if sys.version_info < (3,): - command_line_conf = [ - a.decode(preferredencoding(), 'replace') for a in command_line_conf] + def compat_conf(conf): + if sys.version_info < (3,): + return [a.decode(preferredencoding(), 'replace') for a in conf] + return conf + + command_line_conf = compat_conf(sys.argv[1:]) if '--ignore-config' in command_line_conf: system_conf = [] user_conf = [] else: - system_conf = _readOptions('/etc/youtube-dl.conf') + system_conf = compat_conf(_readOptions('/etc/youtube-dl.conf')) if '--ignore-config' in system_conf: user_conf = [] else: - user_conf = _readUserConf() + user_conf = compat_conf(_readUserConf()) argv = system_conf + user_conf + command_line_conf opts, args = parser.parse_args(argv)