+import urllib.parse
+
from .common import InfoExtractor
-from ..compat import (
- compat_parse_qs,
- compat_urllib_parse_urlparse,
-)
from ..utils import (
dict_get,
int_or_none,
self.raise_geo_restricted(countries=['IT'])
formats = self._extract_m3u8_formats(hls_url, video_id, 'mp4')
- self._sort_formats(formats)
return {
'id': video_id,
def _real_extract(self, url):
video_id = self._match_id(url)
- domain = compat_parse_qs(compat_urllib_parse_urlparse(
+ domain = urllib.parse.parse_qs(urllib.parse.urlparse(
url).query).get('domain', [None])[0]
token = dict_get(self._TOKEN_MAP, (domain, 'sky'))
video = self._download_json(
video_id, query={
'caller': 'sky',
'id': video_id,
- 'token': token
+ 'token': token,
}, headers=self.geo_verification_headers())
return self._parse_video(video, video_id)