mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-09-03 08:35:32 +00:00
Fix lazy extractor bug in fe7866d0ed
and add test Fixes https://github.com/yt-dlp/yt-dlp/pull/3234#issuecomment-1225347071
This commit is contained in:
@ -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)]
|
||||
|
Reference in New Issue
Block a user