X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2F__init__.py;h=cb4f2e41c71de8ba3c4b60b18d12f4bbc388bd36;hb=f889cea109b4e2647e3fd6a462c9893b88b21e04;hp=a8d5095aeba0faed0b0464d82198663efc7dc77c;hpb=d0246d07f1e2f0c81bde051ac10db287b3e5e44b;p=youtube-dl diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index a8d5095ae..cb4f2e41c 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -77,6 +77,12 @@ __authors__ = ( 'Magnus Kolstad', 'Hari Padmanaban', 'Carlos Ramos', + '5moufl', + 'lenaten', + 'Dennis Scheiba', + 'Damon Timm', + 'winwon', + 'Xavier Beynon' ) __license__ = 'Public Domain' @@ -92,6 +98,7 @@ from .options import ( parseOpts, ) from .utils import ( + compat_expanduser, compat_getpass, compat_print, DateRange, @@ -253,8 +260,6 @@ def _real_main(argv=None): date = DateRange.day(opts.date) else: date = DateRange(opts.dateafter, opts.datebefore) - if opts.default_search not in ('auto', 'auto_warning', 'error', 'fixup_error', None) and ':' not in opts.default_search: - parser.error(u'--default-search invalid; did you forget a colon (:) at the end?') # Do not download videos when there are audio-only formats if opts.extractaudio and not opts.keepvideo and opts.format is None: @@ -282,8 +287,8 @@ def _real_main(argv=None): u' file! Use "{0}.%(ext)s" instead of "{0}" as the output' u' template'.format(outtmpl)) - any_printing = opts.geturl or opts.gettitle or opts.getid or opts.getthumbnail or opts.getdescription or opts.getfilename or opts.getformat or opts.getduration or opts.dumpjson - download_archive_fn = os.path.expanduser(opts.download_archive) if opts.download_archive is not None else opts.download_archive + any_printing = opts.geturl or opts.gettitle or opts.getid or opts.getthumbnail or opts.getdescription or opts.getfilename or opts.getformat or opts.getduration or opts.dumpjson or opts.dump_single_json + download_archive_fn = compat_expanduser(opts.download_archive) if opts.download_archive is not None else opts.download_archive ydl_opts = { 'usenetrc': opts.usenetrc, @@ -302,8 +307,9 @@ def _real_main(argv=None): 'forcefilename': opts.getfilename, 'forceformat': opts.getformat, 'forcejson': opts.dumpjson, - 'simulate': opts.simulate, - 'skip_download': (opts.skip_download or opts.simulate or any_printing), + 'dump_single_json': opts.dump_single_json, + 'simulate': opts.simulate or any_printing, + 'skip_download': opts.skip_download, 'format': opts.format, 'format_limit': opts.format_limit, 'listformats': opts.listformats, @@ -367,6 +373,7 @@ def _real_main(argv=None): 'youtube_include_dash_manifest': opts.youtube_include_dash_manifest, 'encoding': opts.encoding, 'exec_cmd': opts.exec_cmd, + 'extract_flat': opts.extract_flat, } with YoutubeDL(ydl_opts) as ydl: