From 40268a79745695a51846700c6af5d11e9a4e6e2a Mon Sep 17 00:00:00 2001 From: Elyse Date: Sun, 19 Jun 2022 08:13:47 -0500 Subject: [PATCH] [extractor/foxnews] Update embed extraction (#4043) Authored by: elyse0 --- yt_dlp/extractor/foxnews.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/yt_dlp/extractor/foxnews.py b/yt_dlp/extractor/foxnews.py index cee4d6b496..e8513f2c28 100644 --- a/yt_dlp/extractor/foxnews.py +++ b/yt_dlp/extractor/foxnews.py @@ -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(?: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\d+) + ''', webpage)] def _real_extract(self, url): host, video_id = self._match_valid_url(url).groups()