1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-24 03:43:01 +08:00

[iprima] Fix ID extraction and page download

This commit is contained in:
Jiří Helebrant 2017-12-15 01:44:58 +01:00
parent 92944ea6ff
commit 1cfc55c9f0

View File

@ -40,15 +40,16 @@ class IPrimaIE(InfoExtractor):
webpage = self._download_webpage(url, video_id)
video_id = self._search_regex(r'data-product="([^"]+)">', webpage, 'real id')
video_id = self._search_regex(r'(?:prehravac/embedded\?id=|productId: \')(p[0-9]+)', webpage, 'real id')
playerpage = self._download_webpage(
'http://play.iprima.cz/prehravac/init',
'http://api.play-backend.iprima.cz/prehravac/init-embed',
video_id, note='Downloading player', query={
'_infuse': 1,
'_ts': round(time.time()),
'productId': video_id,
}, headers={'Referer': url})
'embed': 'true',
}, headers={'Referer': 'http://api.play-backend.iprima.cz/prehravac/embedded?id=' + video_id})
formats = []