diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-12-22 14:59:28 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-12-22 14:59:28 +0100 |
commit | 3425f84f8ba4aa1fa3d124bb0f1ebf5e9c1119df (patch) | |
tree | 9bac2cf51ff90862c253a652333f7ac133e68435 /module/network/RequestFactory.py | |
parent | cleaned request factory (diff) | |
download | pyload-3425f84f8ba4aa1fa3d124bb0f1ebf5e9c1119df.tar.xz |
fixed getURL
Diffstat (limited to 'module/network/RequestFactory.py')
-rw-r--r-- | module/network/RequestFactory.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/module/network/RequestFactory.py b/module/network/RequestFactory.py index d73ab5e20..89d1aaf64 100644 --- a/module/network/RequestFactory.py +++ b/module/network/RequestFactory.py @@ -46,14 +46,12 @@ class RequestFactory(): self.lock.release() return req - def getURL(self, url): - base = HTTPBase() - #@TODO proxies - #@TODO post,get... + def getURL(self, url, get={}, post={}): + #a bit to much overhead for single url + b = Browser() + #@TODO proxies, iface - resp = base.getResponse(url) - resp = resp.read() - return resp + return b.getPage(url, get, post) def getCookieJar(self, pluginName, account=None): if self.cookiejars.has_key((pluginName, account)): @@ -64,5 +62,5 @@ class RequestFactory(): return cj # needs pyreq in global namespace -def getURL(url): - pyreq.getURL(url)
\ No newline at end of file +def getURL(url, get={}, post={}): + return pyreq.getURL(url, get, post)
\ No newline at end of file |