From 6e6bc8dae577c29c072ffc5c25078b5668435435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Sat, 26 Mar 2016 02:19:24 +0600 Subject: Use urlencode_postdata across the codebase --- youtube_dl/extractor/twitch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'youtube_dl/extractor/twitch.py') diff --git a/youtube_dl/extractor/twitch.py b/youtube_dl/extractor/twitch.py index c92dcc7b9..36ee1adff 100644 --- a/youtube_dl/extractor/twitch.py +++ b/youtube_dl/extractor/twitch.py @@ -20,6 +20,7 @@ from ..utils import ( parse_duration, parse_iso8601, sanitized_Request, + urlencode_postdata, ) @@ -81,7 +82,7 @@ class TwitchBaseIE(InfoExtractor): post_url = compat_urlparse.urljoin(redirect_url, post_url) request = sanitized_Request( - post_url, compat_urllib_parse_urlencode(login_form).encode('utf-8')) + post_url, urlencode_postdata(login_form)) request.add_header('Referer', redirect_url) response = self._download_webpage( request, None, 'Logging in as %s' % username) -- cgit v1.2.3