summaryrefslogtreecommitdiffstats
path: root/module/network/Browser.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-05-12 21:57:53 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-05-12 21:57:53 +0200
commite269bec1053f059ba0fd701c1e7fa1ad424726bc (patch)
tree70e4ddb3578f7eef435ed563a9d6b7f9bbd9ddbb /module/network/Browser.py
parentfixed js (diff)
downloadpyload-e269bec1053f059ba0fd701c1e7fa1ad424726bc.tar.xz
some fixes, closed #306
Diffstat (limited to 'module/network/Browser.py')
-rw-r--r--module/network/Browser.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/module/network/Browser.py b/module/network/Browser.py
index 9020a6de1..2dc9c3d83 100644
--- a/module/network/Browser.py
+++ b/module/network/Browser.py
@@ -8,17 +8,16 @@ from HTTPDownload import HTTPDownload
class Browser(object):
- def __init__(self, interface=None, bucket=None, proxies={}):
+ def __init__(self, bucket=None, options={}):
self.log = getLogger("log")
- self.interface = interface
+ self.options = options #holds pycurl options
self.bucket = bucket
- self.proxies = proxies
self.cj = None # needs to be setted later
self._size = 0
- self.http = HTTPRequest(self.cj, interface, proxies)
+ self.http = HTTPRequest(self.cj, options)
self.dl = None
def setLastURL(self, val):
@@ -73,12 +72,12 @@ class Browser(object):
self._size = self.dl.size
self.dl.abort = True
- def httpDownload(self, url, filename, get={}, post={}, ref=True, cookies=True, chunks=1, resume=False, progressNotify=None, disposition=False):
+ def httpDownload(self, url, filename, get={}, post={}, ref=True, cookies=True, chunks=1, resume=False,
+ progressNotify=None, disposition=False):
""" this can also download ftp """
self._size = 0
self.dl = HTTPDownload(url, filename, get, post, self.lastEffectiveURL if ref else None,
- self.cj if cookies else None, self.bucket, self.interface,
- self.proxies, progressNotify, disposition)
+ self.cj if cookies else None, self.bucket, self.options, progressNotify, disposition)
name = self.dl.download(chunks, resume)
self._size = self.dl.size