diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-07-29 17:17:43 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-07-29 17:17:46 +0200 |
commit | 1f7ccb90147184a6234e3b6d603ccec9ee7880e4 (patch) | |
tree | 8b8e6336df3c2e8532de1ae64d481a18f9729a2e /youtube_dl/__init__.py | |
parent | c7b3209668ab722dfab8ebd7b9bb5eb6145f117d (diff) |
[generic] Add --default-search fixup_error
This restores the ability to enter URLs without a scheme (and default to http), but still fail if the input is a search term.
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r-- | youtube_dl/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 6ff0be00f..a3a8013fb 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -258,7 +258,7 @@ def parseOpts(overrideArguments=None): general.add_option( '--default-search', dest='default_search', metavar='PREFIX', - help='Use this prefix for unqualified URLs. For example "gvsearch2:" downloads two videos from google videos for youtube-dl "large apple". Use the value "auto" to let youtube-dl guess. The default value "error" just throws an error.') + help='Use this prefix for unqualified URLs. For example "gvsearch2:" downloads two videos from google videos for youtube-dl "large apple". Use the value "auto" to let youtube-dl guess ("auto_warning" to emit a warning when guessing). "error" just throws an error. The default value "fixup_error" repairs broken URLs, but emits an error if this is not possible instead of searching.') general.add_option( '--ignore-config', action='store_true', @@ -709,7 +709,7 @@ 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', None) and ':' not in opts.default_search: + 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 |