mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-14 00:39:28 +01:00
[extractor/foxnews] Update embed extraction (#4043)
Authored by: elyse0
This commit is contained in:
parent
697ebe4d31
commit
40268a7974
@ -59,10 +59,13 @@ class FoxNewsIE(AMPIE):
|
||||
@staticmethod
|
||||
def _extract_urls(webpage):
|
||||
return [
|
||||
mobj.group('url')
|
||||
f'https://video.foxnews.com/v/video-embed.html?video_id={mobj.group("video_id")}'
|
||||
for mobj in re.finditer(
|
||||
r'<(?:amp-)?iframe[^>]+\bsrc=(["\'])(?P<url>(?:https?:)?//video\.foxnews\.com/v/video-embed\.html?.*?\bvideo_id=\d+.*?)\1',
|
||||
webpage)]
|
||||
r'''(?x)
|
||||
<(?:script|(?:amp-)?iframe)[^>]+\bsrc=["\']
|
||||
(?:https?:)?//video\.foxnews\.com/v/(?:video-embed\.html|embed\.js)\?
|
||||
(?:[^>"\']+&)?(?:video_)?id=(?P<video_id>\d+)
|
||||
''', webpage)]
|
||||
|
||||
def _real_extract(self, url):
|
||||
host, video_id = self._match_valid_url(url).groups()
|
||||
|
Loading…
Reference in New Issue
Block a user