Created
November 22, 2013 16:43
-
-
Save iley/7602960 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/YouTubeCore.py b/YouTubeCore.py | |
index d955e49..b088134 100644 | |
--- a/YouTubeCore.py | |
+++ b/YouTubeCore.py | |
@@ -397,7 +397,10 @@ class YouTubeCore(): | |
return ret_obj | |
if get("url_data"): | |
- request = urllib2.Request(link, urllib.urlencode(get("url_data"))) | |
+ args = {} | |
+ for key, value in get("url_data").iteritems(): | |
+ args[key] = unicode(value).encode('utf-8') | |
+ request = urllib2.Request(link, urllib.urlencode(args)) | |
request.add_header('Content-Type', 'application/x-www-form-urlencoded') | |
elif get("request", "false") == "false": | |
if get("proxy"): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment