Created
December 5, 2011 05:13
-
-
Save mybeky/1432393 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/lixian.py b/lixian.py | |
index 05331e4..7139f51 100644 | |
--- a/lixian.py | |
+++ b/lixian.py | |
@@ -37,7 +37,7 @@ class XunleiClient: | |
def urlopen(self, url, **args): | |
#print url | |
if 'data' in args and type(args['data']) == dict: | |
- args['data'] = urllib.urlencode(args['data']) | |
+ args['data'] = urllib.urlencode(dict([k, unicode(v).encode('utf-8')] for k, v in args['data'].items())) | |
return self.opener.open(urllib2.Request(url, **args)) | |
def load_cookies(self): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment