From 5122028a4bcac4ae577ef7fbd55ccad5cb34ef5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Mon, 18 Oct 2021 15:24:21 -0500 Subject: update from upstream --- hypervideo_dl/extractor/theplatform.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'hypervideo_dl/extractor/theplatform.py') diff --git a/hypervideo_dl/extractor/theplatform.py b/hypervideo_dl/extractor/theplatform.py index adfe11e..c2729f1 100644 --- a/hypervideo_dl/extractor/theplatform.py +++ b/hypervideo_dl/extractor/theplatform.py @@ -10,15 +10,12 @@ import hashlib from .once import OnceIE from .adobepass import AdobePassIE -from ..compat import ( - compat_parse_qs, - compat_urllib_parse_urlparse, -) from ..utils import ( determine_ext, ExtractorError, float_or_none, int_or_none, + parse_qs, sanitized_Request, unsmuggle_url, update_url_query, @@ -238,7 +235,7 @@ class ThePlatformIE(ThePlatformBaseIE, AdobePassIE): 'countries': smuggled_data.get('geo_countries'), }) - mobj = re.match(self._VALID_URL, url) + mobj = self._match_valid_url(url) provider_id = mobj.group('provider_id') video_id = mobj.group('id') @@ -250,7 +247,7 @@ class ThePlatformIE(ThePlatformBaseIE, AdobePassIE): path += mobj.group('media') path += video_id - qs_dict = compat_parse_qs(compat_urllib_parse_urlparse(url).query) + qs_dict = parse_qs(url) if 'guid' in qs_dict: webpage = self._download_webpage(url, video_id) scripts = re.findall(r']+src="([^"]+)"', webpage) @@ -359,7 +356,7 @@ class ThePlatformFeedIE(ThePlatformBaseIE): if first_video_id is None: first_video_id = cur_video_id duration = float_or_none(item.get('plfile$duration')) - file_asset_types = item.get('plfile$assetTypes') or compat_parse_qs(compat_urllib_parse_urlparse(smil_url).query)['assetTypes'] + file_asset_types = item.get('plfile$assetTypes') or parse_qs(smil_url)['assetTypes'] for asset_type in file_asset_types: if asset_type in asset_types: continue @@ -404,7 +401,7 @@ class ThePlatformFeedIE(ThePlatformBaseIE): return ret def _real_extract(self, url): - mobj = re.match(self._VALID_URL, url) + mobj = self._match_valid_url(url) video_id = mobj.group('id') provider_id = mobj.group('provider_id') -- cgit v1.2.3