summaryrefslogtreecommitdiffstats
path: root/module/network
diff options
context:
space:
mode:
authorGravatar Jeix <devnull@localhost> 2010-10-02 20:06:09 +0200
committerGravatar Jeix <devnull@localhost> 2010-10-02 20:06:09 +0200
commitebf957d0fbaa0d52ce248276eee755eff3b60092 (patch)
treecdf537743d4a47bf0a4c2a55b49159dd2581142c /module/network
parentclosed #140 (diff)
downloadpyload-ebf957d0fbaa0d52ce248276eee755eff3b60092.tar.xz
urlencode fix
Diffstat (limited to 'module/network')
-rwxr-xr-xmodule/network/Request.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/module/network/Request.py b/module/network/Request.py
index f322c847a..bbce37d6b 100755
--- a/module/network/Request.py
+++ b/module/network/Request.py
@@ -127,7 +127,7 @@ class Request:
self.pycurl.setopt(pycurl.NOPROGRESS, 1)
- url = str(url)
+ url = self.__myquote(str(url))
if post:
if not no_post_encode:
@@ -204,7 +204,7 @@ class Request:
def download(self, url, file_name, folder, get={}, post={}, ref=True, cookies=True, no_post_encode=False):
- url = str(url)
+ url = self.__myquote(str(url))
self.pycurl.setopt(pycurl.NOPROGRESS, 0)
@@ -384,6 +384,10 @@ class Request:
self.pycurl.close()
except:
pass
+
+ def __myquote(self, url):
+ return urllib.quote(url, safe="%/:=&?~#+!$,;'@()*[]")
+
def getURL(url, get={}, post={}):
"""