mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 09:07:58 +01:00
[extractor/foxnews] Update embed extraction (#4043)
Authored by: elyse0
This commit is contained in:
parent
697ebe4d31
commit
40268a7974
1 changed files with 6 additions and 3 deletions
|
@ -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 a new issue