mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-08-26 13:53:45 +03:00
fix: grab all matched urls
This commit is contained in:
@@ -2282,11 +2282,12 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
# Invidious Instances
|
# Invidious Instances
|
||||||
# https://github.com/yt-dlp/yt-dlp/issues/195
|
# https://github.com/yt-dlp/yt-dlp/issues/195
|
||||||
# https://github.com/iv-org/invidious/pull/1730
|
# https://github.com/iv-org/invidious/pull/1730
|
||||||
mobj = re.search(
|
matches = re.findall(
|
||||||
r'<link rel="alternate" href="(?P<url>https://www\.youtube\.com/watch\?v=[0-9A-Za-z_-]{11})"',
|
r'<link rel="alternate" href="(?P<url>https://www\.youtube\.com/watch\?v=[0-9A-Za-z_-]{11})"',
|
||||||
webpage)
|
webpage)
|
||||||
if mobj:
|
if matches:
|
||||||
yield cls.url_result(mobj.group('url'), cls)
|
for match_url in matches:
|
||||||
|
yield cls.url_result(match_url, cls)
|
||||||
raise cls.StopExtraction
|
raise cls.StopExtraction
|
||||||
|
|
||||||
yield from super()._extract_from_webpage(url, webpage)
|
yield from super()._extract_from_webpage(url, webpage)
|
||||||
|
|||||||
Reference in New Issue
Block a user