Browse Source

[twitch] Fix non-ASCII logins/passwords on python 2

Sergey M․ 10 years ago
parent
commit
c0bf5e1c4d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      youtube_dl/extractor/twitch.py

+ 2 - 2
youtube_dl/extractor/twitch.py

@@ -64,8 +64,8 @@ class TwitchBaseIE(InfoExtractor):
             login_page))
             login_page))
 
 
         login_form.update({
         login_form.update({
-            'login': username,
-            'password': password,
+            'login': username.encode('utf-8'),
+            'password': password.encode('utf-8'),
         })
         })
 
 
         request = compat_urllib_request.Request(
         request = compat_urllib_request.Request(