X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=youtube_dl%2F__init__.py;h=8f8422cc7689483f33b4658a224e123d80d8472f;hb=9986238ba9a486ca76334c50562760a312ab20fa;hp=27886593b4f40a2a4108b867bb7ca71b26379e93;hpb=dca087205692c934163ec9aca5962056f890cd19;p=youtube-dl diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 27886593b..8f8422cc7 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -35,6 +35,7 @@ __authors__ = ( 'Jelle van der Waa', 'Marcin Cieślak', 'Anton Larionov', + 'Takuya Tsuchida', ) __license__ = 'Public Domain' @@ -205,7 +206,9 @@ def parseOpts(overrideArguments=None): dest='playlistend', metavar='NUMBER', help='playlist video to end at (default is last)', default=-1) selection.add_option('--match-title', dest='matchtitle', metavar='REGEX',help='download only matching titles (regex or caseless sub-string)') selection.add_option('--reject-title', dest='rejecttitle', metavar='REGEX',help='skip download for matching titles (regex or caseless sub-string)') - selection.add_option('--max-downloads', metavar='NUMBER', dest='max_downloads', help='Abort after downloading NUMBER files', default=None) + selection.add_option('--max-downloads', metavar='NUMBER', + dest='max_downloads', type=int, default=None, + help='Abort after downloading NUMBER files') selection.add_option('--min-filesize', metavar='SIZE', dest='min_filesize', help="Do not download any videos smaller than SIZE (e.g. 50k or 44.6m)", default=None) selection.add_option('--max-filesize', metavar='SIZE', dest='max_filesize', help="Do not download any videos larger than SIZE (e.g. 50k or 44.6m)", default=None) selection.add_option('--date', metavar='DATE', dest='date', help='download only videos uploaded in this date', default=None) @@ -232,7 +235,7 @@ def parseOpts(overrideArguments=None): video_format.add_option('-f', '--format', action='store', dest='format', metavar='FORMAT', default='best', - help='video format code, specifiy the order of preference using slashes: "-f 22/17/18". "-f mp4" and "-f flv" are also supported') + help='video format code, specify the order of preference using slashes: "-f 22/17/18". "-f mp4" and "-f flv" are also supported') video_format.add_option('--all-formats', action='store_const', dest='format', help='download all available video formats', const='all') video_format.add_option('--prefer-free-formats', @@ -648,6 +651,7 @@ def _real_main(argv=None): 'download_archive': opts.download_archive, 'cookiefile': opts.cookiefile, 'nocheckcertificate': opts.no_check_certificate, + 'proxy': opts.proxy, } with YoutubeDL(ydl_opts) as ydl: