소스 검색

[youtube] Encode the data when submitting the form for confirming the age

Needed on python 3
Jaime Marquínez Ferrándiz 11 년 전
부모
커밋
5700e7792a
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      youtube_dl/extractor/youtube.py

+ 2 - 1
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,