mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-12-27 21:59:17 +01:00
parent
061a17abd3
commit
43aebb7db4
4 changed files with 12 additions and 13 deletions
|
@ -58,14 +58,13 @@ class FoxNewsIE(AMPIE):
|
|||
|
||||
@classmethod
|
||||
def _extract_embed_urls(cls, url, webpage):
|
||||
return [
|
||||
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'''(?x)
|
||||
<(?:script|(?:amp-)?iframe)[^>]+\bsrc=["\']
|
||||
(?:https?:)?//video\.foxnews\.com/v/(?:video-embed\.html|embed\.js)\?
|
||||
(?:[^>"\']+&)?(?: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):
|
||||
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())
|
||||
|
||||
return self.url_result(
|
||||
FoxNewsIE._extract_embed_urls(url, webpage)[0], FoxNewsIE.ie_key())
|
||||
next(FoxNewsIE._extract_embed_urls(url, webpage)), FoxNewsIE.ie_key())
|
||||
|
|
|
@ -371,7 +371,7 @@ class FranceTVInfoIE(FranceTVBaseInfoExtractor):
|
|||
|
||||
webpage = self._download_webpage(url, display_id)
|
||||
|
||||
dailymotion_urls = DailymotionIE._extract_embed_urls(url, webpage)
|
||||
dailymotion_urls = tuple(DailymotionIE._extract_embed_urls(url, webpage))
|
||||
if dailymotion_urls:
|
||||
return self.playlist_result([
|
||||
self.url_result(dailymotion_url, DailymotionIE.ie_key())
|
||||
|
|
|
@ -121,7 +121,7 @@ class HeiseIE(InfoExtractor):
|
|||
if kaltura_id:
|
||||
return _make_kaltura_result('kaltura:2238431:%s' % kaltura_id)
|
||||
|
||||
yt_urls = YoutubeIE._extract_embed_urls(url, webpage)
|
||||
yt_urls = tuple(YoutubeIE._extract_embed_urls(url, webpage))
|
||||
if yt_urls:
|
||||
return self.playlist_from_matches(
|
||||
yt_urls, video_id, title, ie=YoutubeIE.ie_key())
|
||||
|
|
|
@ -447,17 +447,17 @@ class VKIE(VKBaseIE):
|
|||
m_rutube.group(1).replace('\\', ''))
|
||||
return self.url_result(rutube_url)
|
||||
|
||||
dailymotion_urls = DailymotionIE._extract_embed_urls(url, info_page)
|
||||
if dailymotion_urls:
|
||||
return self.url_result(dailymotion_urls[0], DailymotionIE.ie_key())
|
||||
dailymotion_url = next(DailymotionIE._extract_embed_urls(url, info_page), None)
|
||||
if dailymotion_url:
|
||||
return self.url_result(dailymotion_url, DailymotionIE.ie_key())
|
||||
|
||||
odnoklassniki_url = OdnoklassnikiIE._extract_url(info_page)
|
||||
if odnoklassniki_url:
|
||||
return self.url_result(odnoklassniki_url, OdnoklassnikiIE.ie_key())
|
||||
|
||||
sibnet_urls = self._extract_embed_urls(url, info_page)
|
||||
if sibnet_urls:
|
||||
return self.url_result(sibnet_urls[0])
|
||||
sibnet_url = next(self._extract_embed_urls(url, info_page), None)
|
||||
if sibnet_url:
|
||||
return self.url_result(sibnet_url)
|
||||
|
||||
m_opts = re.search(r'(?s)var\s+opts\s*=\s*({.+?});', info_page)
|
||||
if m_opts:
|
||||
|
|
Loading…
Reference in a new issue