diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-12-27 21:18:29 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-12-27 21:18:29 +0100 |
commit | 9509a6444bbb538e136ed899d94aab32be629383 (patch) | |
tree | ac8532b20912a3e5be6ff73443520a7f31f5806a /module/network/RequestFactory.py | |
parent | encoding fix (diff) | |
download | pyload-9509a6444bbb538e136ed899d94aab32be629383.tar.xz |
new curl download backend - support for chunked dl, resume
Diffstat (limited to 'module/network/RequestFactory.py')
-rw-r--r-- | module/network/RequestFactory.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/module/network/RequestFactory.py b/module/network/RequestFactory.py index 89d1aaf64..6ad64589a 100644 --- a/module/network/RequestFactory.py +++ b/module/network/RequestFactory.py @@ -20,7 +20,7 @@ from threading import Lock from Browser import Browser -from HTTPBase import HTTPBase +from HTTPRequest import HTTPRequest from CookieJar import CookieJar class RequestFactory(): @@ -29,8 +29,6 @@ class RequestFactory(): self.core = core self.cookiejars = {} - iface = property(lambda self: self.core.config["general"]["download_interface"]) - def getRequest(self, pluginName, account=None): self.lock.acquire() @@ -48,10 +46,10 @@ class RequestFactory(): def getURL(self, url, get={}, post={}): #a bit to much overhead for single url - b = Browser() - #@TODO proxies, iface - - return b.getPage(url, get, post) + h = HTTPRequest() + rep = h.load(url, get, post) + h.close() + return rep def getCookieJar(self, pluginName, account=None): if self.cookiejars.has_key((pluginName, account)): |