diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-02 22:14:08 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-02 22:14:08 +0200 |
commit | 5a679eeada699b74e29bf8947d25ae3e83289180 (patch) | |
tree | 61ee647b97ecf14a7d3516f29962507e70b3a560 /module/network | |
parent | urlencode fix (diff) | |
download | pyload-5a679eeada699b74e29bf8947d25ae3e83289180.tar.xz |
improved accountmanager
Diffstat (limited to 'module/network')
-rwxr-xr-x | module/network/Request.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/module/network/Request.py b/module/network/Request.py index bbce37d6b..f5c856f6f 100755 --- a/module/network/Request.py +++ b/module/network/Request.py @@ -85,7 +85,8 @@ class Request: self.pycurl.setopt(pycurl.NOSIGNAL, 1) self.pycurl.setopt(pycurl.NOPROGRESS, 0) self.pycurl.setopt(pycurl.PROGRESSFUNCTION, self.progress) - self.pycurl.setopt(pycurl.AUTOREFERER, 1) + if hasattr(pycurl, "AUTOREFERER"): + self.pycurl.setopt(pycurl.AUTOREFERER, 1) self.pycurl.setopt(pycurl.HEADERFUNCTION, self.write_header) self.pycurl.setopt(pycurl.BUFFERSIZE, self.bufferSize) self.pycurl.setopt(pycurl.SSL_VERIFYPEER, 0) @@ -96,7 +97,7 @@ class Request: self.pycurl.setopt(pycurl.INTERFACE, self.interface) - self.pycurl.setopt(pycurl.USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.10") + self.pycurl.setopt(pycurl.USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en; rv:1.9.2.10) Gecko/20100916 Firefox/3.6.10") if pycurl.version_info()[7]: self.pycurl.setopt(pycurl.ENCODING, "gzip, deflate") self.pycurl.setopt(pycurl.HTTPHEADER, ["Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", @@ -267,7 +268,7 @@ class Request: else: self.updateCurrentSpeed(float(self.chunkRead/1024) / subTime) - self.subStartTime = time.time() + self.subStartTime += subTime # time.time() self.chunkRead = 0 if self.maxSpeed > 0: self.maxChunkSize = self.maxSpeed |