diff options
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/FileserveCom.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/FshareVn.py | 5 | ||||
-rw-r--r-- | module/plugins/hoster/RapidshareCom.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/ShareonlineBiz.py | 7 | ||||
-rw-r--r-- | module/plugins/hoster/UploadedTo.py | 13 |
5 files changed, 16 insertions, 15 deletions
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index 7a06472d3..0f8372cf7 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -105,13 +105,13 @@ class FileserveCom(Hoster): self.doTimmer() else: - self.fail("Unknown server response") + self.error("Unknown server response") # show download link response = self.load(self.url, post={"downloadLink": "show"}, decode=True) self.logDebug("Show downloadLink response : %s" % response) if "fail" in response: - self.fail("Couldn't retrieve download url") + self.error("Couldn't retrieve download url") # this may either download our file or forward us to an error page self.download(self.url, post={"download": "normal"}) diff --git a/module/plugins/hoster/FshareVn.py b/module/plugins/hoster/FshareVn.py index 7ce7cd3e6..23a66a1c1 100644 --- a/module/plugins/hoster/FshareVn.py +++ b/module/plugins/hoster/FshareVn.py @@ -111,8 +111,9 @@ class FshareVn(SimpleHoster): self.wait(wait_until - mktime(gmtime()) - 7 * 60 * 60, True) self.retry() elif '<ul class="message-error">' in self.html: - self.logError("Unknown error occured or wait time not parsed") - self.retry(30, 2 * 60, "Unknown error") + msg = "Unknown error occured or wait time not parsed" + self.logError(msg) + self.retry(30, 2 * 60, msg) def checkDownloadedFile(self): diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py index 2dd36b84e..b0462e82c 100644 --- a/module/plugins/hoster/RapidshareCom.py +++ b/module/plugins/hoster/RapidshareCom.py @@ -106,7 +106,7 @@ class RapidshareCom(Hoster): elif self.api_data['status'] == "3": self.tempOffline() else: - self.fail("Unknown response code.") + self.error("Unknown response code.") def handleFree(self): diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index b7c112a45..565e0364a 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -176,9 +176,10 @@ class ShareonlineBiz(Hoster): return err = m.group(1) - m = re.search(self.ERROR_INFO_PATTERN, self.html) - msg = m.group(1) if m else "" - self.logError(err, msg or "Unknown error occurred") + try: + self.logError(err, re.search(self.ERROR_INFO_PATTERN, self.html).group(1)) + except: + self.logError(err, "Unknown error occurred") if err == "invalid": self.fail(msg or "File not available") diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 764bb75de..055047859 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -94,7 +94,7 @@ def getInfo(urls): class UploadedTo(Hoster): __name__ = "UploadedTo" __type__ = "hoster" - __version__ = "0.74" + __version__ = "0.75" __pattern__ = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)' @@ -198,16 +198,15 @@ class UploadedTo(Hoster): self.fail("File not downloadable for free users") self.setWait(int(m.group(1))) - js = self.load("http://uploaded.net/js/download.js", decode=True) - - challengeId = re.search(r'Recaptcha\.create\("([^"]+)', js) + self.html = self.load("http://uploaded.net/js/download.js", decode=True) url = "http://uploaded.net/io/ticket/captcha/%s" % self.fileID downloadURL = "" + recaptcha = ReCaptcha(self) + for _ in xrange(5): - re_captcha = ReCaptcha(self) - challenge, result = re_captcha.challenge(challengeId.group(1)) + challenge, result = recaptcha.challenge() options = {"recaptcha_challenge_field": challenge, "recaptcha_response_field": result} self.wait() @@ -234,7 +233,7 @@ class UploadedTo(Hoster): downloadURL = re.search("url:'([^']+)", result).group(1) break else: - self.fail("Unknown error '%s'" % result) + self.error("Unknown error '%s'" % result) if not downloadURL: self.fail("No Download url retrieved/all captcha attempts failed") |