From ee383fe3d45aded7be86d3b06e256c94829614e1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 1 Jun 2015 19:46:11 +0200 Subject: Fix https://github.com/pyload/pyload/issues/1445 --- module/plugins/internal/SimpleHoster.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'module') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index c333f34b0..222ba4b05 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.50" + __version__ = "1.51" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available" , True), @@ -474,7 +474,7 @@ class SimpleHoster(Hoster): if not self.link and not self.lastDownload: self.MULTI_HOSTER = False - self.retry(1, reason="Multi hoster fails") + self.retry(1, reason=_("Multi hoster fails")) if not self.link and not self.lastDownload: self.preload() @@ -635,9 +635,14 @@ class SimpleHoster(Hoster): elif re.search('up to', errmsg, re.I): self.fail(_("File too large for free download")) - elif re.search('offline|delet|remov|not (found|available)', errmsg, re.I): + elif re.search('offline|delet|remov|not? (found|(longer)? available)', errmsg, re.I): self.offline() + elif re.search('filename', errmsg, re.I): + url_p = urlparse.urlparse(self.pyfile.url) + self.pyfile.url = "%s://%s/%s" % (url_p.scheme, url_p.netloc, url_p.path.strip('/').split('/')[0]) + self.retry(1, reason=_("Wrong url")) + elif re.search('premium', errmsg, re.I): self.fail(_("File can be downloaded by premium users only")) -- cgit v1.2.3