diff options
author | einstein95 <einstein95@users.noreply.github.com> | 2018-01-12 07:01:02 +1300 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2018-04-21 23:22:25 +0700 |
commit | 4b8588fe0215fb5ea75d4f37402ec51014cb8c53 (patch) | |
tree | f8d49e6b4e4054387ffd716443b7c753004c94fe /youtube_dl/extractor/rentv.py | |
parent | d65a48a0efd2184f7b2fdc823433f568bae56d86 (diff) |
[rentv] Fix extraction
Diffstat (limited to 'youtube_dl/extractor/rentv.py')
-rw-r--r-- | youtube_dl/extractor/rentv.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/youtube_dl/extractor/rentv.py b/youtube_dl/extractor/rentv.py index d338b3a93..df528b09e 100644 --- a/youtube_dl/extractor/rentv.py +++ b/youtube_dl/extractor/rentv.py @@ -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): |