+import urllib.parse
+
from .common import InfoExtractor
-from ..compat import (
- compat_str,
- compat_urllib_parse_urlparse,
-)
from ..utils import (
- urljoin,
int_or_none,
parse_codecs,
parse_qs,
try_get,
+ urljoin,
)
def _raw_id(src_url):
- return compat_urllib_parse_urlparse(src_url).path.split('/')[-1]
+ return urllib.parse.urlparse(src_url).path.split('/')[-1]
class SeznamZpravyIE(InfoExtractor):
f = {
'url': urljoin(sdn_url, relative_url),
- 'format_id': 'http-%s' % format_id,
+ 'format_id': f'http-{format_id}',
'tbr': int_or_none(format_data.get('bandwidth'), scale=1000),
'width': int_or_none(width),
'height': int_or_none(height),
pls = sdn_data.get('pls', {})
def get_url(format_id):
- return try_get(pls, lambda x: x[format_id]['url'], compat_str)
+ return try_get(pls, lambda x: x[format_id]['url'], str)
dash_rel_url = get_url('dash')
if dash_rel_url: