From f8253af561655c7c470323e631e8b66283bcf623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Sat, 19 Dec 2015 19:03:55 +0600 Subject: [PATCH] [toggle] Use sanitized_Request --- youtube_dl/extractor/togglesg.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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')