diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-06-12 19:20:12 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-06-12 19:20:12 +0600 |
commit | d22dec74ffa2a53a1c04770af37d39f384f3d56c (patch) | |
tree | 63d827c74e252e7c7b00cca57e0e008b72b6a9d2 /youtube_dl/extractor | |
parent | 9872d3110c0d3027dac856e005299f3682ef23ed (diff) |
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/extractor')
-rw-r--r-- | youtube_dl/extractor/generic.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 40d869c53..3d672197c 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -977,7 +977,9 @@ class GenericIE(InfoExtractor): 'upload_date': upload_date, } - if not self._downloader.params.get('test', False) and not is_intentional: + if (not self._downloader.params.get('test', False) and + not is_intentional and + not self._downloader.params.get('force_generic_extractor', False)): self._downloader.report_warning('Falling back on generic information extractor.') if not full_response: |