Skip to content

Instantly share code, notes, and snippets.

@iley
Created November 22, 2013 16:43
Show Gist options
  • Save iley/7602960 to your computer and use it in GitHub Desktop.
Save iley/7602960 to your computer and use it in GitHub Desktop.
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