diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-08-24 05:42:16 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-08-24 07:47:51 +0530 |
commit | fe7866d0ed6bfa3904ce12b049a3424fdc0ea1fa (patch) | |
tree | ce07f269160c2cf3c971ee83e82f19feceffcfeb /yt_dlp/extractor/common.py | |
parent | 5314b521925498356e78652fe59866116d56e1d1 (diff) | |
download | hypervideo-pre-fe7866d0ed6bfa3904ce12b049a3424fdc0ea1fa.tar.lz hypervideo-pre-fe7866d0ed6bfa3904ce12b049a3424fdc0ea1fa.tar.xz hypervideo-pre-fe7866d0ed6bfa3904ce12b049a3424fdc0ea1fa.zip |
Add option `--use-extractors`
Deprecates `--force-generic-extractor`
Closes #3234, Closes #2044
Related: #4307, #1791
Diffstat (limited to 'yt_dlp/extractor/common.py')
-rw-r--r-- | yt_dlp/extractor/common.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index a534703e5..6337a13a4 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -480,6 +480,9 @@ class InfoExtractor: will be used by geo restriction bypass mechanism similarly to _GEO_COUNTRIES. + The _ENABLED attribute should be set to False for IEs that + are disabled by default and must be explicitly enabled. + The _WORKING attribute should be set to False for broken IEs in order to warn the users and skip the tests. """ @@ -491,6 +494,7 @@ class InfoExtractor: _GEO_COUNTRIES = None _GEO_IP_BLOCKS = None _WORKING = True + _ENABLED = True _NETRC_MACHINE = None IE_DESC = None SEARCH_KEY = None @@ -3941,3 +3945,12 @@ class SearchInfoExtractor(InfoExtractor): @classproperty def SEARCH_KEY(cls): return cls._SEARCH_KEY + + +class UnsupportedURLIE(InfoExtractor): + _VALID_URL = '.*' + _ENABLED = False + IE_DESC = False + + def _real_extract(self, url): + raise UnsupportedError(url) |