diff options
Diffstat (limited to 'module')
-rw-r--r-- | module/DatabaseBackend.py | 2 | ||||
-rw-r--r-- | module/network/HTTPRequest.py | 3 | ||||
-rw-r--r-- | module/plugins/hoster/ShareonlineBiz.py | 9 |
3 files changed, 8 insertions, 6 deletions
diff --git a/module/DatabaseBackend.py b/module/DatabaseBackend.py index f8e90b97a..2267f3577 100644 --- a/module/DatabaseBackend.py +++ b/module/DatabaseBackend.py @@ -47,7 +47,7 @@ class style(): @staticmethod def x(*args, **kwargs): if cls.db: - return f(cls.db, *args[1:], **kwargs) + return f(cls.db, *args, **kwargs) return x @classmethod diff --git a/module/network/HTTPRequest.py b/module/network/HTTPRequest.py index bcd2c696c..42b7aaf51 100644 --- a/module/network/HTTPRequest.py +++ b/module/network/HTTPRequest.py @@ -124,12 +124,15 @@ class HTTPRequest(): self.c.lastUrl = url if post: + self.c.setopt(pycurl.POST, 1) if not multipart: post = urlencode(post) self.c.setopt(pycurl.POSTFIELDS, post) else: post = [(x, str(quote(y)) if type(y) in (str, unicode) else y ) for x,y in post.iteritems()] self.c.setopt(pycurl.HTTPPOST, post) + else: + self.c.setopt(pycurl.POST, 0) if referer and self.lastURL: self.c.setopt(pycurl.REFERER, self.lastURL) diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index 37130cf66..d2fc6a54d 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -118,14 +118,13 @@ class ShareonlineBiz(Hoster): pw = self.account.accounts[self.user]["password"] info = self.account.getUserAPI(self.user) - if info["dl"] == "not_available": + if info["dl"].lower() == "not_available": self.fail("DL API error") - cj = self.account.getAccountCookies(self.user) - cj.setCookie("share-online.biz", "dl", info["dl"]) + self.req.cj.setCookie("share-online.biz", "dl", info["dl"]) lid = self.pyfile.url.replace("http://www.share-online.biz/dl/", "") #cut of everything but the id - src = self.load("http://api.share-online.biz/account.php?username=%s&password=%s&act=download&lid=%s" % (user, self.accounts[user]["password"], lid)) + src = self.load("http://api.share-online.biz/account.php?username=%s&password=%s&act=download&lid=%s" % (self.user, self.account.accounts[self.user]["password"], lid), post={}) dlinfo = {} for line in src.splitlines(): key, value = line.split(": ") @@ -135,7 +134,7 @@ class ShareonlineBiz(Hoster): self.offline() dlLink = dlinfo["url"] - self.download(download_url) + self.download(dlLink) def handleWebsitePremium(self): #seems to be buggy self.resumeDownload = False |