mirror of https://github.com/yt-dlp/yt-dlp.git
[iprima] Modernize
This commit is contained in:
parent
2cc7fcd338
commit
82f662182b
|
@ -8,7 +8,6 @@ from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
determine_ext,
|
determine_ext,
|
||||||
js_to_json,
|
js_to_json,
|
||||||
sanitized_Request,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,11 +37,13 @@ class IPrimaIE(InfoExtractor):
|
||||||
|
|
||||||
video_id = self._search_regex(r'data-product="([^"]+)">', webpage, 'real id')
|
video_id = self._search_regex(r'data-product="([^"]+)">', webpage, 'real id')
|
||||||
|
|
||||||
req = sanitized_Request(
|
playerpage = self._download_webpage(
|
||||||
'http://play.iprima.cz/prehravac/init?_infuse=1'
|
'http://play.iprima.cz/prehravac/init',
|
||||||
'&_ts=%s&productId=%s' % (round(time.time()), video_id))
|
video_id, note='Downloading player', query={
|
||||||
req.add_header('Referer', url)
|
'_infuse': 1,
|
||||||
playerpage = self._download_webpage(req, video_id, note='Downloading player')
|
'_ts': round(time.time()),
|
||||||
|
'productId': video_id,
|
||||||
|
}, headers={'Referer': url})
|
||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue