-# coding: utf-8
-from __future__ import unicode_literals
+import urllib.parse
from .common import InfoExtractor
-from ..compat import compat_urlparse
from ..utils import (
determine_ext,
int_or_none,
webpage, 'data url', group='url').replace(r'\/', '/')
doc = self._download_xml(
- compat_urlparse.urljoin(url, data_url), video_id)
+ urllib.parse.urljoin(url, data_url), video_id)
title = xpath_text(doc, ['./title', './broadcast/broadcastName'], 'title', fatal=True)
'progressiveDownload',
'dynamicHttpStreamingRedirector',
'adaptiveHttpStreamingRedirector'):
- url_el = asset.find('./%sUrl' % source)
+ url_el = asset.find(f'./{source}Url')
if url_el is None:
continue
formats.append(f)
- self._sort_formats(formats)
-
description = xpath_text(doc, './broadcast/broadcastDescription', 'description')
timestamp = parse_iso8601(
xpath_text(