summaryrefslogtreecommitdiffstats
path: root/pyload/network
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/network')
-rw-r--r--pyload/network/Browser.py4
-rw-r--r--pyload/network/CookieJar.py8
-rw-r--r--pyload/network/HTTPRequest.py18
-rw-r--r--pyload/network/XDCCRequest.py4
4 files changed, 17 insertions, 17 deletions
diff --git a/pyload/network/Browser.py b/pyload/network/Browser.py
index fab7454f3..59cc9dcb0 100644
--- a/pyload/network/Browser.py
+++ b/pyload/network/Browser.py
@@ -118,12 +118,12 @@ class Browser(object):
:param pwd: string, user:password
"""
- self.options["auth"] = pwd
+ self.options['auth'] = pwd
self.renewHTTPRequest() #: we need a new request
def removeAuth(self):
- if "auth" in self.options: del self.options["auth"]
+ if "auth" in self.options: del self.options['auth']
self.renewHTTPRequest()
diff --git a/pyload/network/CookieJar.py b/pyload/network/CookieJar.py
index 35d7fa6ef..a970a08e5 100644
--- a/pyload/network/CookieJar.py
+++ b/pyload/network/CookieJar.py
@@ -24,8 +24,8 @@ class CookieJar(Cookie.SimpleCookie):
def setCookie(self, domain, name, value, path="/", exp=None, secure="FALSE"):
self[name] = value
- self[name]["domain"] = domain
- self[name]["path"] = path
+ self[name]['domain'] = domain
+ self[name]['path'] = path
# Value of expires should be integer if possible
# otherwise the cookie won't be used
@@ -37,7 +37,7 @@ class CookieJar(Cookie.SimpleCookie):
except ValueError:
expires = exp
- self[name]["expires"] = expires
+ self[name]['expires'] = expires
if secure == "TRUE":
- self[name]["secure"] = secure
+ self[name]['secure'] = secure
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):
diff --git a/pyload/network/XDCCRequest.py b/pyload/network/XDCCRequest.py
index 01fc2ea78..ccaeebe5f 100644
--- a/pyload/network/XDCCRequest.py
+++ b/pyload/network/XDCCRequest.py
@@ -34,10 +34,10 @@ class XDCCRequest(object):
# proxy = None
# if self.proxies.has_key("socks5"):
# proxytype = socks.PROXY_TYPE_SOCKS5
- # proxy = self.proxies["socks5"]
+ # proxy = self.proxies['socks5']
# elif self.proxies.has_key("socks4"):
# proxytype = socks.PROXY_TYPE_SOCKS4
- # proxy = self.proxies["socks4"]
+ # proxy = self.proxies['socks4']
# if proxytype:
# sock = socks.socksocket()
# t = _parse_proxy(proxy)