mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-16 21:33:19 +00:00
[rutube] Fix extraction
This commit is contained in:
parent
525dc9809e
commit
d7f1e7c88f
|
@ -43,13 +43,14 @@ def _real_extract(self, url):
|
||||||
'http://rutube.ru/api/video/%s/?format=json' % video_id,
|
'http://rutube.ru/api/video/%s/?format=json' % video_id,
|
||||||
video_id, 'Downloading video JSON')
|
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 {}
|
author = video.get('author') or {}
|
||||||
m3u8_url = trackinfo['video_balancer'].get('m3u8')
|
|
||||||
|
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:
|
if m3u8_url is None:
|
||||||
raise ExtractorError('Couldn\'t find m3u8 manifest url')
|
raise ExtractorError('Couldn\'t find m3u8 manifest url')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue