0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-01 23:12:40 +00:00

Fixed the ustream extractor to use the current ustream API

This commit is contained in:
David Rabinowitz 2015-10-01 12:07:27 +03:00 committed by Sergey M․
parent 88c86d211b
commit 7fd4ed9939

View file

@ -52,17 +52,12 @@ def _real_extract(self, url):
desktop_url = 'http://www.ustream.tv/recorded/' + desktop_video_id desktop_url = 'http://www.ustream.tv/recorded/' + desktop_video_id
return self.url_result(desktop_url, 'Ustream') return self.url_result(desktop_url, 'Ustream')
params = self._download_json( params = self._download_json('https://api.ustream.tv/videos/' + video_id + '.json', video_id)
'http://cdngw.ustream.tv/rgwjson/Viewer.getVideo/' + json.dumps({
'brandId': 1,
'videoId': int(video_id),
'autoplay': False,
}), video_id)
if 'error' in params: if 'error' in params:
raise ExtractorError(params['error']['message'], expected=True) raise ExtractorError(params['error']['message'], expected=True)
video_url = params['flv'] video_url = params['video']['media_urls']['flv']
webpage = self._download_webpage(url, video_id) webpage = self._download_webpage(url, video_id)