From: Sergey M․ Date: Sat, 19 Dec 2015 13:03:55 +0000 (+0600) Subject: [toggle] Use sanitized_Request X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=f8253af561655c7c470323e631e8b66283bcf623;p=youtube-dl [toggle] Use sanitized_Request --- diff --git a/youtube_dl/extractor/togglesg.py b/youtube_dl/extractor/togglesg.py index 9f958d453..05a9e5439 100644 --- a/youtube_dl/extractor/togglesg.py +++ b/youtube_dl/extractor/togglesg.py @@ -11,7 +11,8 @@ from ..utils import ( int_or_none, determine_ext, parse_iso8601, - remove_end + remove_end, + sanitized_Request, ) from ..compat import compat_urllib_request @@ -107,7 +108,7 @@ class ToggleSgIE(InfoExtractor): 'mediaType': 0, } - req = compat_urllib_request.Request( + req = sanitized_Request( 'http://tvpapi.as.tvinci.com/v2_9/gateways/jsonpostgw.aspx?m=GetMediaInfo', json.dumps(params).encode('utf-8')) info = self._download_json(req, video_id, 'Downloading video info json')