diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-20 14:25:57 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-20 14:25:57 +0100 |
commit | 6d9c5ff2e06e06e33fa6674f013dd0e290092bbd (patch) | |
tree | 0f2c9905320f68416010d12e9d68c573f387def2 | |
parent | Fix password retrieving in some plugins (diff) | |
download | pyload-6d9c5ff2e06e06e33fa6674f013dd0e290092bbd.tar.xz |
[SimpleHoster] Improve checkFile
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 949a6c66a..784ef8c85 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -155,7 +155,7 @@ def _isDirectLink(self, url, resumable=True): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "0.76" + __version__ = "0.77" __pattern__ = r'^unmatchable$' @@ -407,11 +407,16 @@ class SimpleHoster(Hoster): def downloadLink(self, link): if link and isinstance(link, basestring): + self.correctCaptcha() self.download(link, disposition=True) def checkFile(self): - if not self.lastDownload or not exists(fs_encode(self.lastDownload)): + if self.cTask and not self.lastDownload: + self.invalidCaptcha() + self.retry(10, reason=_("Wrong captcha")) + + elif not self.lastDownload or not exists(fs_encode(self.lastDownload)): self.fail(_("No file downloaded")) else: |