diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-05 00:57:14 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-05 00:57:14 +0200 |
commit | bd4beeeefff3f9de7ece2cdcc6a619154bc3d83b (patch) | |
tree | 8126fe2f5416371b871d704f63c07e4cb0313e64 /module | |
parent | fixed some bugs, new externalscripts plugin (diff) | |
download | pyload-bd4beeeefff3f9de7ece2cdcc6a619154bc3d83b.tar.xz |
sj fix
Diffstat (limited to 'module')
-rw-r--r-- | module/network/HTTPRequest.py | 2 | ||||
-rw-r--r-- | module/plugins/Plugin.py | 4 | ||||
-rw-r--r-- | module/plugins/crypter/SerienjunkiesOrg.py | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/module/network/HTTPRequest.py b/module/network/HTTPRequest.py index 6707cc70e..bd04ac3cf 100644 --- a/module/network/HTTPRequest.py +++ b/module/network/HTTPRequest.py @@ -147,7 +147,7 @@ class HTTPRequest(): self.c.setopt(pycurl.POST, 0) if referer and self.lastURL: - self.c.setopt(pycurl.REFERER, self.lastURL) + self.c.setopt(pycurl.REFERER, str(self.lastURL)) if cookies: self.c.setopt(pycurl.COOKIEFILE, "") diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index 4eb0ee477..65d3cbf9c 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -101,7 +101,9 @@ class Plugin(object): #: account handler instance, see :py:class:`Account` self.account = pyfile.m.core.accountManager.getAccountPlugin(self.__name__) + #: premium status self.premium = False + #: username/login self.user = None if self.account and not self.account.canUse(): self.account = None @@ -120,6 +122,7 @@ class Plugin(object): self.log = pyfile.m.core.log + #: associated pyfile instance, see `PyFile` self.pyfile = pyfile self.thread = None # holds thread in future @@ -361,6 +364,7 @@ class Plugin(object): """ if self.pyfile.abort: raise Abort #utf8 vs decode -> please use decode attribute in all future plugins + if type(url) == unicode: url = str(url) res = self.req.load(url, get, post, ref, cookies, just_header, decode=utf8 or decode) diff --git a/module/plugins/crypter/SerienjunkiesOrg.py b/module/plugins/crypter/SerienjunkiesOrg.py index 1e322a3a3..21afc88e8 100644 --- a/module/plugins/crypter/SerienjunkiesOrg.py +++ b/module/plugins/crypter/SerienjunkiesOrg.py @@ -133,8 +133,8 @@ class SerienjunkiesOrg(Crypter): result = self.decryptCaptcha(str(captchaUrl), imgtype="png") sinp = form.find(attrs={"name":"s"}) - self.req.lastURL = url - sj = self.req.load(str(url), post={'s': sinp["value"], 'c': result, 'action': "Download"}) + self.req.lastURL = str(url) + sj = self.load(str(url), post={'s': sinp["value"], 'c': result, 'action': "Download"}) soup = BeautifulSoup(sj) rawLinks = soup.findAll(attrs={"action": re.compile("^http://download.serienjunkies.org/")}) |