mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-23 00:52:01 +00: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
|
@staticmethod
|
||||||
def _extract_urls(webpage):
|
def _extract_urls(webpage):
|
||||||
return [
|
return [
|
||||||
mobj.group('url')
|
f'https://video.foxnews.com/v/video-embed.html?video_id={mobj.group("video_id")}'
|
||||||
for mobj in re.finditer(
|
for mobj in re.finditer(
|
||||||
r'<(?:amp-)?iframe[^>]+\bsrc=(["\'])(?P<url>(?:https?:)?//video\.foxnews\.com/v/video-embed\.html?.*?\bvideo_id=\d+.*?)\1',
|
r'''(?x)
|
||||||
webpage)]
|
<(?: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):
|
def _real_extract(self, url):
|
||||||
host, video_id = self._match_valid_url(url).groups()
|
host, video_id = self._match_valid_url(url).groups()
|
||||||
|
Loading…
Reference in New Issue
Block a user