projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[ubu] Add missing whitespace
[youtube-dl]
/
youtube_dl
/
extractor
/
rutube.py
diff --git
a/youtube_dl/extractor/rutube.py
b/youtube_dl/extractor/rutube.py
index f1ce6643379069373d859b3540c25e56639cac63..357edbbdaf88c6c29395aa7878c18f305c79b216 100644
(file)
--- 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')
'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
# 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')
if m3u8_url is None:
raise ExtractorError('Couldn\'t find m3u8 manifest url')