about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-01-25 17:22:41 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-01-25 17:22:41 +0100
commit5700e7792aed45d6504ae957610d8254d5bb073f (patch)
tree94733e24f53046ea64fe53e0e9d913891d5e60ad
parent38c2e5b8d5ac616dbfd5fff3b023583fe5c3a30d (diff)
downloadyoutube-dl-5700e7792aed45d6504ae957610d8254d5bb073f.tar.gz
youtube-dl-5700e7792aed45d6504ae957610d8254d5bb073f.tar.xz
youtube-dl-5700e7792aed45d6504ae957610d8254d5bb073f.zip
[youtube] Encode the data when submitting the form for confirming the age
Needed on python 3
-rw-r--r--youtube_dl/extractor/youtube.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index c3fbbc0de..87a5a452e 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -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,