diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-05 16:23:42 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-05 16:23:42 +0200 |
commit | 08d629c98d7c0acb24dd03c785f3d64fb98bbdeb (patch) | |
tree | 936643ea8ebb11f0985a0818bdf1b4c714353d78 /module/plugins | |
parent | Fix https://github.com/pyload/pyload/issues/1450 (diff) | |
download | pyload-08d629c98d7c0acb24dd03c785f3d64fb98bbdeb.tar.xz |
Fix http://forum.pyload.org/viewtopic.php?f=10&t=4301
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/hoster/UploadedTo.py | 31 | ||||
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 8 |
2 files changed, 9 insertions, 30 deletions
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 16966a23d..68b50561e 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UploadedTo(SimpleHoster): __name__ = "UploadedTo" __type__ = "hoster" - __version__ = "0.89" + __version__ = "0.90" __pattern__ = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -29,10 +29,7 @@ class UploadedTo(SimpleHoster): TEMP_OFFLINE_PATTERN = r'<title>uploaded\.net - Maintenance' - LINK_PREMIUM_PATTERN = r'<div class="tfree".*\s*<form method="post" action="(.+?)"' - WAIT_PATTERN = r'Current waiting period: <span>(\d+)' - DL_LIMIT_ERROR = r'You have reached the max. number of possible free downloads for this hour' @classmethod @@ -58,7 +55,7 @@ class UploadedTo(SimpleHoster): def setup(self): - self.multiDL = self.resumeDownload = self.premium + self.multiDL = self.resumeDownload = self.premium self.chunkLimit = 1 # critical problems with more chunks @@ -67,27 +64,11 @@ class UploadedTo(SimpleHoster): self.logError(_("Free-download capacities exhausted")) self.retry(24, 5 * 60) - elif "limit-size" in self.html: - self.fail(_("File too big for free download")) - - elif "limit-slot" in self.html: # Temporary restriction so just wait a bit - self.wait(30 * 60, True) - self.retry() - - elif "limit-parallel" in self.html: - self.fail(_("Cannot download in parallel")) + return super(UploadedTo, self).checkErrors() - elif "limit-dl" in self.html or self.DL_LIMIT_ERROR in self.html: # limit-dl - self.wait(3 * 60 * 60, True) - self.retry() - elif '"err":"captcha"' in self.html: - self.invalidCaptcha() - - else: - m = re.search(self.WAIT_PATTERN, self.html) - if m: - self.wait(m.group(1)) + def handlePremium(self, pyfile): + self.link = pyfile.url + "/ddl?pw=" + self.getPassword() def handleFree(self, pyfile): @@ -110,8 +91,6 @@ class UploadedTo(SimpleHoster): except Exception: pass - self.checkErrors() - def checkFile(self, rules={}): if self.checkDownload({'limit-dl': self.DL_LIMIT_ERROR}): diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 33e7d3674..4c1441e4b 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -239,7 +239,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.53" + __version__ = "1.54" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available" , True), @@ -615,7 +615,7 @@ class SimpleHoster(Hoster): self.info['error'] = re.sub(r'<.*?>', " ", errmsg) self.logWarning(self.info['error']) - if re.search('limit|wait', errmsg, re.I): + if re.search('limit|wait|slot', errmsg, re.I): if re.search("da(il)?y|today", errmsg): wait_time = secondsToMidnight(gmt=2) else: @@ -633,12 +633,12 @@ class SimpleHoster(Hoster): self.retry(10, reason=_("Wrong captcha")) elif re.search('countdown|expired', errmsg, re.I): - self.retry(wait_time=60, reason=_("Link expired")) + self.retry(10, wait_time=60, reason=_("Link expired")) elif re.search('maintenance|maintainance|temp', errmsg, re.I): self.tempOffline() - elif re.search('up to', errmsg, re.I): + elif re.search('up to|size', errmsg, re.I): self.fail(_("File too large for free download")) elif re.search('offline|delet|remov|not? (found|(longer)? available)', errmsg, re.I): |