-# coding: utf-8
-from __future__ import unicode_literals
+import urllib.parse
-import re
-
-from .common import InfoExtractor
from .brightcove import BrightcoveLegacyIE
-from ..compat import (
- compat_parse_qs,
- compat_urlparse,
-)
+from .common import InfoExtractor
from ..utils import smuggle_url
'upload_date': '20210428',
},
'params': {
- 'format': 'bestvideo',
'skip_download': True,
},
}, {
BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/1969646226001/default_default/index.html?videoId=%s'
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
+ mobj = self._match_valid_url(url)
display_id = mobj.group('id') or 'direct'
webpage = self._download_webpage(url, display_id)
brightcove_legacy_url = BrightcoveLegacyIE._extract_brightcove_url(webpage)
if brightcove_legacy_url:
- brightcove_id = compat_parse_qs(compat_urlparse.urlparse(
+ brightcove_id = urllib.parse.parse_qs(urllib.parse.urlparse(
brightcove_legacy_url).query)['@videoPlayer'][0]
else:
brightcove_id = self._search_regex(