diff options
author | Jeix <devnull@localhost> | 2010-12-01 19:19:48 +0100 |
---|---|---|
committer | Jeix <devnull@localhost> | 2010-12-01 19:19:48 +0100 |
commit | 8922d93070ae079a02e14e60b6ac20da64fc23d3 (patch) | |
tree | 351205d95835fb3bf59a7e49091b69223d15c028 /module/network | |
parent | correct invalid DLCs (diff) | |
download | pyload-8922d93070ae079a02e14e60b6ac20da64fc23d3.tar.xz |
Diffstat (limited to 'module/network')
-rwxr-xr-x | module/network/Request.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/module/network/Request.py b/module/network/Request.py index b393012a9..b281714a3 100755 --- a/module/network/Request.py +++ b/module/network/Request.py @@ -125,7 +125,7 @@ class Request: return self.cookieJar.getCookie(name) return None - def load(self, url, get={}, post={}, ref=True, cookies=True, just_header=False, no_post_encode=False): + def load(self, url, get={}, post={}, ref=True, cookies=True, just_header=False, no_post_encode=False, raw_cookies={}): self.pycurl.setopt(pycurl.NOPROGRESS, 1) @@ -149,6 +149,8 @@ class Request: if cookies: self.curl_enable_cookies() self.getCookies() + if raw_cookies: + self.pycurl.setopt(pycurl.COOKIELIST, "Set-Cookie: %s;"% "; ".join(["%s=%s"%(x,y) for x,y in raw_cookies.items()])) if post: self.pycurl.setopt(pycurl.POSTFIELDS, post) |