From ebf957d0fbaa0d52ce248276eee755eff3b60092 Mon Sep 17 00:00:00 2001 From: Jeix Date: Sat, 2 Oct 2010 20:06:09 +0200 Subject: urlencode fix --- module/network/Request.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'module/network') 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={}): """ -- cgit v1.2.3