diff options
author | Sergey M․ <dstftw@gmail.com> | 2014-04-19 15:59:12 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2014-04-19 15:59:12 +0700 |
commit | d7f1e7c88f01105d07f8552675b4c272b8206971 (patch) | |
tree | d718e5967e13d07d14d519a920d3ba105548abaa /youtube_dl | |
parent | 525dc9809e8ddd1761e4eff7517bddc527c44e79 (diff) |
[rutube] Fix extraction
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/rutube.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/youtube_dl/extractor/rutube.py b/youtube_dl/extractor/rutube.py index f1ce66433..4f7f8cb6d 100644 --- a/youtube_dl/extractor/rutube.py +++ b/youtube_dl/extractor/rutube.py @@ -43,13 +43,14 @@ class RutubeIE(InfoExtractor): 'http://rutube.ru/api/video/%s/?format=json' % video_id, video_id, 'Downloading video JSON') - trackinfo = self._download_json( - 'http://rutube.ru/api/play/trackinfo/%s/?format=json' % video_id, - video_id, 'Downloading trackinfo JSON') - # Some videos don't have the author field - author = trackinfo.get('author') or {} - m3u8_url = trackinfo['video_balancer'].get('m3u8') + author = video.get('author') or {} + + options = self._download_json( + 'http://rutube.ru/api/play/options/%s/?format=json' %video_id, + video_id, 'Downloading options JSON') + + m3u8_url = options['video_balancer'].get('m3u8') if m3u8_url is None: raise ExtractorError('Couldn\'t find m3u8 manifest url') |