diff options
author | Sergey M․ <dstftw@gmail.com> | 2016-03-26 02:19:24 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-03-26 02:19:24 +0600 |
commit | 6e6bc8dae577c29c072ffc5c25078b5668435435 (patch) | |
tree | 600a978f35617628856094486422e13c78d67ee7 /youtube_dl/extractor/youtube.py | |
parent | 15707c7e024f1f29e7abd8ddaa362196ef2d4af6 (diff) |
Use urlencode_postdata across the codebase
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r-- | youtube_dl/extractor/youtube.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 83b5840f7..8c321f1fc 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -44,6 +44,7 @@ from ..utils import ( unified_strdate, unsmuggle_url, uppercase_escape, + urlencode_postdata, ISO3166Utils, ) @@ -115,7 +116,7 @@ class YoutubeBaseInfoExtractor(InfoExtractor): 'hl': 'en_US', } - login_data = compat_urllib_parse_urlencode(login_form_strs).encode('ascii') + login_data = urlencode_postdata(login_form_strs) req = sanitized_Request(self._LOGIN_URL, login_data) login_results = self._download_webpage( @@ -148,7 +149,7 @@ class YoutubeBaseInfoExtractor(InfoExtractor): 'TrustDevice': 'on', }) - tfa_data = compat_urllib_parse_urlencode(tfa_form_strs).encode('ascii') + tfa_data = urlencode_postdata(tfa_form_strs) tfa_req = sanitized_Request(self._TWOFACTOR_URL, tfa_data) tfa_results = self._download_webpage( |