diff options
author | 2015-05-12 02:17:30 +0200 | |
---|---|---|
committer | 2015-05-12 03:22:32 +0200 | |
commit | 000426c9d890ba2a71625a7454f9c573f10b9bae (patch) | |
tree | 8fa66da5061b850778f72f84038d9bb8bfa31f2f /pyload/network/HTTPRequest.py | |
parent | 'from os' -> 'import os' and so on... (diff) | |
download | pyload-000426c9d890ba2a71625a7454f9c573f10b9bae.tar.xz |
'from time' -> 'import time' and so on...
Diffstat (limited to 'pyload/network/HTTPRequest.py')
-rw-r--r-- | pyload/network/HTTPRequest.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pyload/network/HTTPRequest.py b/pyload/network/HTTPRequest.py index 74b83cf12..14c5b8cb6 100644 --- a/pyload/network/HTTPRequest.py +++ b/pyload/network/HTTPRequest.py @@ -3,10 +3,11 @@ from __future__ import with_statement +import urllib + import pycurl from codecs import getincrementaldecoder, lookup, BOM_UTF8 -from urllib import quote, urlencode from httplib import responses from logging import getLogger from cStringIO import StringIO @@ -17,12 +18,12 @@ from pyload.utils import encode def myquote(url): - return quote(encode(url), safe="%/:=&?~#+!$,;'@()*[]") + return urllib.quote(encode(url), safe="%/:=&?~#+!$,;'@()*[]") def myurlencode(data): data = dict(data) - return urlencode(dict((encode(x), encode(y)) for x, y in data.iteritems())) + return urllib.urlencode(dict((encode(x), encode(y)) for x, y in data.iteritems())) bad_headers = range(400, 404) + range(405, 418) + range(500, 506) @@ -148,7 +149,7 @@ class HTTPRequest(object): url = myquote(url) if get: - get = urlencode(get) + get = urllib.urlencode(get) url = "%s?%s" % (url, get) self.c.setopt(pycurl.URL, url) |