1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-21 17:51:51 +00:00

[rentv] Fix extraction

This commit is contained in:
einstein95 2018-01-12 07:01:02 +13:00 committed by Sergey M․
parent d65a48a0ef
commit 4b8588fe02
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -26,9 +26,20 @@ class RENTVIE(InfoExtractor):
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage('http://ren.tv/player/' + video_id, video_id)
jw_config = self._parse_json(self._search_regex(
r'config\s*=\s*({.+});', webpage, 'jw config'), video_id)
return self._parse_jwplayer_data(jw_config, video_id, m3u8_id='hls')
config = self._parse_json(self._search_regex(
r'config\s*=\s*({.+});', webpage, 'config'), video_id)
formats = []
for video in config.get('src', ''):
formats.append({
'url': video.get('src', '')
})
self._sort_formats(formats)
return {
'id': video_id,
'formats': formats,
'title': config.get('title', ''),
'thumbnail': config.get('image', '')
}
class RENTVArticleIE(InfoExtractor):