summaryrefslogtreecommitdiffstats
path: root/module/RequestFactory.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-06-30 17:23:57 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-06-30 17:23:57 +0200
commitaee4d8d8907c2973019277c5e9a011d82181f95b (patch)
treeb6dea70c51a81f7f95123084569ccad71500ad9e /module/RequestFactory.py
parentYouPorn name fix (diff)
downloadpyload-aee4d8d8907c2973019277c5e9a011d82181f95b.tar.xz
RapidshareCom premium fix
Diffstat (limited to 'module/RequestFactory.py')
-rw-r--r--module/RequestFactory.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/module/RequestFactory.py b/module/RequestFactory.py
index f66dfaf5d..975356254 100644
--- a/module/RequestFactory.py
+++ b/module/RequestFactory.py
@@ -21,6 +21,7 @@ from threading import Lock
from module.network.Request import Request
from module.network.XdccRequest import XdccRequest
from module.network.FtpRequest import FtpRequest
+from time import time
import pycurl
class RequestFactory():
@@ -81,3 +82,7 @@ class CookieJar():
def getCookie(self, name):
return self.parseCookie(name)
+
+ def setCookie(self, domain, name, value, path="/", exp=time()+3600*24*180):
+ s = ".%s TRUE %s FALSE %s %s %s" % (domain, path, exp, name, value)
+ self.cookies[name] = s