aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/options.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-06-12 19:20:12 +0600
committerSergey M․ <dstftw@gmail.com>2015-06-12 19:20:12 +0600
commitd22dec74ffa2a53a1c04770af37d39f384f3d56c (patch)
tree63d827c74e252e7c7b00cca57e0e008b72b6a9d2 /youtube_dl/options.py
parent9872d3110c0d3027dac856e005299f3682ef23ed (diff)
downloadyoutube-dl-d22dec74ffa2a53a1c04770af37d39f384f3d56c.tar.xz
Add `--force-generic-extractor`
For some extractors that are hard to workout a good _VALID_URL we use very vague and unrestrictive ones, e.g. just allowing anything after hostname and capturing part of URL as id. If some of these extractors happen to have an video embed of some different hoster or platform and this scenario was not handled in extractor itself we end up with inability to download this embed until extractor is fixed to support embed of this kind. Forcing downloader to use the generic extractor can be a neat temporary solution for this problem. Example: FiveTV extractor with Tvigle embed - http://www.5-tv.ru/rabota/broadcasts/48/
Diffstat (limited to 'youtube_dl/options.py')
-rw-r--r--youtube_dl/options.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/options.py b/youtube_dl/options.py
index 689fa7595..096ab6137 100644
--- a/youtube_dl/options.py
+++ b/youtube_dl/options.py
@@ -151,6 +151,10 @@ def parseOpts(overrideArguments=None):
action='store_true', dest='list_extractor_descriptions', default=False,
help='Output descriptions of all supported extractors')
general.add_option(
+ '--force-generic-extractor',
+ action='store_true', dest='force_generic_extractor', default=False,
+ help='Force extraction to use the generic extractor')
+ 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 ("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.')