mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-07-10 15:28:33 +00:00
fix: grab all matched urls
This commit is contained in:
parent
e67d786c7c
commit
8b76538b27
@ -2282,11 +2282,12 @@ def _extract_from_webpage(cls, url, webpage):
|
|||||||
# 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)
|
||||||
|
Loading…
Reference in New Issue
Block a user