mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-25 20:55:52 +01:00
[generic] Add support for embedded rutv player
This commit is contained in:
parent
a7515ec265
commit
93d020dd65
@ -24,6 +24,7 @@
|
|||||||
)
|
)
|
||||||
from .brightcove import BrightcoveIE
|
from .brightcove import BrightcoveIE
|
||||||
from .ooyala import OoyalaIE
|
from .ooyala import OoyalaIE
|
||||||
|
from .rutv import RUTVIE
|
||||||
|
|
||||||
|
|
||||||
class GenericIE(InfoExtractor):
|
class GenericIE(InfoExtractor):
|
||||||
@ -143,8 +144,22 @@ class GenericIE(InfoExtractor):
|
|||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Between Two Ferns with Zach Galifianakis: President Barack Obama',
|
'title': 'Between Two Ferns with Zach Galifianakis: President Barack Obama',
|
||||||
'description': 'Episode 18: President Barack Obama sits down with Zach Galifianakis for his most memorable interview yet.',
|
'description': 'Episode 18: President Barack Obama sits down with Zach Galifianakis for his most memorable interview yet.',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
|
# RUTV embed
|
||||||
|
{
|
||||||
|
'url': 'http://www.rg.ru/2014/03/15/reg-dfo/anklav-anons.html',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '776940',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Охотское море стало целиком российским',
|
||||||
|
'description': 'md5:5ed62483b14663e2a95ebbe115eb8f43',
|
||||||
|
},
|
||||||
|
'params': {
|
||||||
|
# m3u8 download
|
||||||
|
'skip_download': True,
|
||||||
|
},
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
def report_download_webpage(self, video_id):
|
def report_download_webpage(self, video_id):
|
||||||
@ -451,6 +466,11 @@ def _real_extract(self, url):
|
|||||||
return self.playlist_result(
|
return self.playlist_result(
|
||||||
urlrs, playlist_id=video_id, playlist_title=video_title)
|
urlrs, playlist_id=video_id, playlist_title=video_title)
|
||||||
|
|
||||||
|
# Look for embedded RUTV player
|
||||||
|
rutv_url = RUTVIE._extract_url(webpage)
|
||||||
|
if rutv_url:
|
||||||
|
return self.url_result(rutv_url, 'RUTV')
|
||||||
|
|
||||||
# Start with something easy: JW Player in SWFObject
|
# Start with something easy: JW Player in SWFObject
|
||||||
mobj = re.search(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage)
|
mobj = re.search(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage)
|
||||||
if mobj is None:
|
if mobj is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user