X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fbrightcove.py;h=f5ebae1e68e456c158476a02d9df49feac97e02a;hb=5c2266df4b9aeb7881ed8c026a038e2a25e43734;hp=14ee05f213843de58445a7f054299ead92c1c963;hpb=67dda51722f1ce12b956782d43047b3fff390115;p=youtube-dl diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.py index 14ee05f21..f5ebae1e6 100644 --- a/youtube_dl/extractor/brightcove.py +++ b/youtube_dl/extractor/brightcove.py @@ -11,7 +11,6 @@ from ..compat import ( compat_str, compat_urllib_parse, compat_urllib_parse_urlparse, - compat_urllib_request, compat_urlparse, compat_xml_parse_error, ) @@ -24,6 +23,7 @@ from ..utils import ( js_to_json, int_or_none, parse_iso8601, + sanitized_Request, unescapeHTML, unsmuggle_url, ) @@ -250,7 +250,7 @@ class BrightcoveLegacyIE(InfoExtractor): def _get_video_info(self, video_id, query_str, query, referer=None): request_url = self._FEDERATED_URL_TEMPLATE % query_str - req = compat_urllib_request.Request(request_url) + req = sanitized_Request(request_url) linkBase = query.get('linkBaseURL') if linkBase is not None: referer = linkBase[0] @@ -443,7 +443,7 @@ class BrightcoveNewIE(InfoExtractor): r'policyKey\s*:\s*(["\'])(?P.+?)\1', webpage, 'policy key', group='pk') - req = compat_urllib_request.Request( + req = sanitized_Request( 'https://edge.api.brightcove.com/playback/v1/accounts/%s/videos/%s' % (account_id, video_id), headers={'Accept': 'application/json;pk=%s' % policy_key})