From a321e0d4ab22373933c7d9c0a0d26996889004a5 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 31 Aug 2011 15:30:33 +0200 Subject: closed #357, #384 --- module/plugins/hoster/FileserveCom.py | 25 ++++++++++++------------- module/plugins/hoster/NetloadIn.py | 5 +---- 2 files changed, 13 insertions(+), 17 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index 4654e4a7e..53a970226 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -2,6 +2,7 @@ from __future__ import with_statement import re +from base64 import standard_b64encode from module.plugins.Hoster import Hoster from module.plugins.ReCaptcha import ReCaptcha @@ -34,7 +35,7 @@ class FileserveCom(Hoster): __name__ = "FileserveCom" __type__ = "hoster" __pattern__ = r"http://(www\.)?fileserve\.com/file/[a-zA-Z0-9]+" - __version__ = "0.41" + __version__ = "0.42" __description__ = """Fileserve.Com File Download Hoster""" __author_name__ = ("jeix", "mkaay", "paul king") __author_mail__ = ("jeix@hasnomail.de", "mkaay@mkaay.de", "") @@ -80,17 +81,8 @@ class FileserveCom(Hoster): def handlePremium(self): - - ret = self.account.loginApi(self.user, self.req) - ret = self.account.getShorten(self.req, ret["token"].strip("\x00"), self.file_id) - - #110 offline - if ret["result_code"] == "110": - self.offline() - - data = self.account.getDirectLink(self.req, ret["token"].strip("\x00")) - - self.download(data['result_string']) + # handle login timeouts + self.download(self.pyfile.url) def handleFree(self): self.html = self.load(self.pyfile.url) @@ -136,7 +128,8 @@ class FileserveCom(Hoster): self.download(self.pyfile.url, post={"download": "normal"}) check = self.checkDownload({"expired": "Your download link has expired", - "wait": re.compile(self.LONG_WAIT_PATTERN)}) + "wait": re.compile(self.LONG_WAIT_PATTERN), + "limit": "Your daily download limit has been reached"}) if check == "expired": self.logDebug("Download link was expired") @@ -148,6 +141,12 @@ class FileserveCom(Hoster): self.setWait(wait_time + 3, True) self.wait() self.retry() + elif check == "limit": + #download limited reached for today (not a exact time known) + + self.setWait(180 * 60, True) # wait 3 hours + self.wait() + self.retry(max_tries=0) self.thread.m.reconnecting.wait(3) # Ease issue with later downloads appearing to be in parallel diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index d913d3a6f..59786d996 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -55,9 +55,8 @@ class NetloadIn(Hoster): __name__ = "NetloadIn" __type__ = "hoster" __pattern__ = r"http://.*netload\.in/(?:datei(.*?)(?:\.htm|/)|index.php?id=10&file_id=)" - __version__ = "0.32" + __version__ = "0.33" __description__ = """Netload.in Download Hoster""" - __config__ = [ ("dumpgen", "bool", "Generate debug page dumps on stdout", "False") ] __author_name__ = ("spoob", "RaNaN", "Gregy") __author_mail__ = ("spoob@pyload.org", "ranan@pyload.org", "gregy@gregy.cz") @@ -162,8 +161,6 @@ class NetloadIn(Hoster): self.fail(_("File temporarily not available")) self.log.debug("Netload: try number %d " % i) - if self.getConf('dumpgen'): - print page if re.search(r"(We will prepare your download..)", page) is not None: self.log.debug("Netload: We will prepare your download") -- cgit v1.2.3