diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-08-24 15:10:21 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-08-24 15:19:58 +0530 |
commit | e5458d1d88fcc81011ab19ba610c4b37946c9fa9 (patch) | |
tree | e067a87ab01558cb3f54a50e5d410b5e18f0ab2a /yt_dlp/extractor/testurl.py | |
parent | b5e7a2e69d94d68d47586452e6014e03cf2a2805 (diff) | |
download | hypervideo-pre-e5458d1d88fcc81011ab19ba610c4b37946c9fa9.tar.lz hypervideo-pre-e5458d1d88fcc81011ab19ba610c4b37946c9fa9.tar.xz hypervideo-pre-e5458d1d88fcc81011ab19ba610c4b37946c9fa9.zip |
Fix lazy extractor bug in fe7866d0ed6bfa3904ce12b049a3424fdc0ea1fa
and add test
Fixes https://github.com/yt-dlp/yt-dlp/pull/3234#issuecomment-1225347071
Diffstat (limited to 'yt_dlp/extractor/testurl.py')
-rw-r--r-- | yt_dlp/extractor/testurl.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/yt_dlp/extractor/testurl.py b/yt_dlp/extractor/testurl.py index d205fe053..2bce3b239 100644 --- a/yt_dlp/extractor/testurl.py +++ b/yt_dlp/extractor/testurl.py @@ -8,12 +8,14 @@ class TestURLIE(InfoExtractor): """ Allows addressing of the test cases as test:yout.*be_1 """ IE_DESC = False # Do not list - _VALID_URL = r'test(?:url)?:(?P<extractor>.+?)(?:_(?P<num>[0-9]+))?$' + _VALID_URL = r'test(?:url)?:(?P<extractor>.*?)(?:_(?P<num>[0-9]+))?$' def _real_extract(self, url): from . import gen_extractor_classes extractor_id, num = self._match_valid_url(url).group('extractor', 'num') + if not extractor_id: + return {'id': ':test', 'title': '', 'url': url} rex = re.compile(extractor_id, flags=re.IGNORECASE) matching_extractors = [e for e in gen_extractor_classes() if rex.search(e.IE_NAME)] |