diff options
author | cp1 <christopherpool1@googlemail.com> | 2009-05-31 18:41:48 +0200 |
---|---|---|
committer | cp1 <christopherpool1@googlemail.com> | 2009-05-31 18:41:48 +0200 |
commit | a78d2e61ec431a0a7b57286ef9db3f94de46230b (patch) | |
tree | c6aaf064b856dd1ac60729805bac3839d79c94b0 /module/network | |
parent | download plugin for xup.in added, download works with post data (diff) | |
download | pyload-a78d2e61ec431a0a7b57286ef9db3f94de46230b.tar.xz |
Backed out changeset 9455bf89f55f made by spoob.
Diffstat (limited to 'module/network')
-rwxr-xr-x | module/network/Request.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/module/network/Request.py b/module/network/Request.py index 25eccab87..86449a4f2 100755 --- a/module/network/Request.py +++ b/module/network/Request.py @@ -51,6 +51,7 @@ class Request: ("Accept-Encoding","gzip,deflate"), ("Accept","text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), ("Accept-Charset","ISO-8859-1,utf-8;q=0.7,*;q=0.7")] + def load(self, url, get = {}, post = {}, ref = True): @@ -89,17 +90,11 @@ class Request: #def download(url, filename, reporthook = None, data = None): #default von urlretrieve auch None? # return self.downloader.urlretrieve(url, filename, reporthook, data) - def download(self, url, filename, post = {}): - - if post: - post = urllib.urlencode(post) - else: - post = None - + def download(self, url, filename): if not self.dl: self.dl = True file = open(filename, 'wb') - req = urllib2.Request(url, post) + req = urllib2.Request(url) conn = self.downloader.open(req) self.dl_size = int(conn.headers["content-length"]) self.dl_arrived = 0 |