diff options
Diffstat (limited to 'pyload/network/HTTPRequest.py')
-rw-r--r-- | pyload/network/HTTPRequest.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pyload/network/HTTPRequest.py b/pyload/network/HTTPRequest.py index 3e5903df3..62c0ef72b 100644 --- a/pyload/network/HTTPRequest.py +++ b/pyload/network/HTTPRequest.py @@ -93,24 +93,24 @@ class HTTPRequest(object): def setInterface(self, options): - interface, proxy, ipv6 = options["interface"], options["proxies"], options["ipv6"] + interface, proxy, ipv6 = options['interface'], options['proxies'], options['ipv6'] if interface and interface.lower() != "none": self.c.setopt(pycurl.INTERFACE, str(interface)) if proxy: - if proxy["type"] == "socks4": + if proxy['type'] == "socks4": self.c.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_SOCKS4) - elif proxy["type"] == "socks5": + elif proxy['type'] == "socks5": self.c.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_SOCKS5) else: self.c.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_HTTP) - self.c.setopt(pycurl.PROXY, str(proxy["address"])) - self.c.setopt(pycurl.PROXYPORT, proxy["port"]) + self.c.setopt(pycurl.PROXY, str(proxy['address'])) + self.c.setopt(pycurl.PROXYPORT, proxy['port']) - if proxy["username"]: - self.c.setopt(pycurl.PROXYUSERPWD, str("%s:%s" % (proxy["username"], proxy["password"]))) + if proxy['username']: + self.c.setopt(pycurl.PROXYUSERPWD, str("%s:%s" % (proxy['username'], proxy['password']))) if ipv6: self.c.setopt(pycurl.IPRESOLVE, pycurl.IPRESOLVE_WHATEVER) @@ -118,10 +118,10 @@ class HTTPRequest(object): self.c.setopt(pycurl.IPRESOLVE, pycurl.IPRESOLVE_V4) if "auth" in options: - self.c.setopt(pycurl.USERPWD, str(options["auth"])) + self.c.setopt(pycurl.USERPWD, str(options['auth'])) if "timeout" in options: - self.c.setopt(pycurl.LOW_SPEED_TIME, options["timeout"]) + self.c.setopt(pycurl.LOW_SPEED_TIME, options['timeout']) def addCookies(self): |