]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[youtube] Encode the data when submitting the form for confirming the age
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 25 Jan 2014 16:22:41 +0000 (17:22 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 25 Jan 2014 16:22:41 +0000 (17:22 +0100)
Needed on python 3

youtube_dl/extractor/youtube.py

index c3fbbc0de4f20cf764d59ee1068e25db8d65c913..87a5a452e011ba5270b39dd815eb6abc611781c3 100644 (file)
@@ -111,7 +111,8 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
             'next_url': '/',
             'action_confirm': 'Confirm',
         }
-        req = compat_urllib_request.Request(self._AGE_URL, compat_urllib_parse.urlencode(age_form))
+        req = compat_urllib_request.Request(self._AGE_URL,
+            compat_urllib_parse.urlencode(age_form).encode('ascii'))
 
         self._download_webpage(
             req, None,