|
|
@ -58,14 +58,13 @@ class FoxNewsIE(AMPIE):
|
|
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
@classmethod
|
|
|
|
def _extract_embed_urls(cls, url, webpage):
|
|
|
|
def _extract_embed_urls(cls, url, webpage):
|
|
|
|
return [
|
|
|
|
for mobj in re.finditer(
|
|
|
|
f'https://video.foxnews.com/v/video-embed.html?video_id={mobj.group("video_id")}'
|
|
|
|
|
|
|
|
for mobj in re.finditer(
|
|
|
|
|
|
|
|
r'''(?x)
|
|
|
|
r'''(?x)
|
|
|
|
<(?:script|(?:amp-)?iframe)[^>]+\bsrc=["\']
|
|
|
|
<(?:script|(?:amp-)?iframe)[^>]+\bsrc=["\']
|
|
|
|
(?:https?:)?//video\.foxnews\.com/v/(?:video-embed\.html|embed\.js)\?
|
|
|
|
(?:https?:)?//video\.foxnews\.com/v/(?:video-embed\.html|embed\.js)\?
|
|
|
|
(?:[^>"\']+&)?(?:video_)?id=(?P<video_id>\d+)
|
|
|
|
(?:[^>"\']+&)?(?:video_)?id=(?P<video_id>\d+)
|
|
|
|
''', webpage)]
|
|
|
|
''', webpage):
|
|
|
|
|
|
|
|
yield f'https://video.foxnews.com/v/video-embed.html?video_id={mobj.group("video_id")}'
|
|
|
|
|
|
|
|
|
|
|
|
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()
|
|
|
@ -125,4 +124,4 @@ class FoxNewsArticleIE(InfoExtractor):
|
|
|
|
'http://video.foxnews.com/v/' + video_id, FoxNewsIE.ie_key())
|
|
|
|
'http://video.foxnews.com/v/' + video_id, FoxNewsIE.ie_key())
|
|
|
|
|
|
|
|
|
|
|
|
return self.url_result(
|
|
|
|
return self.url_result(
|
|
|
|
FoxNewsIE._extract_embed_urls(url, webpage)[0], FoxNewsIE.ie_key())
|
|
|
|
next(FoxNewsIE._extract_embed_urls(url, webpage)), FoxNewsIE.ie_key())
|
|
|
|