From 07471fe730b0a50fb3b23ec0eb78061046867500 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 30 Apr 2011 21:37:01 +0200 Subject: closed #294, #295 --- module/plugins/hoster/UploadedTo.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/UploadedTo.py') diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index a593e9355..18d886947 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -145,17 +145,26 @@ class UploadedTo(Hoster): result = self.load(url, post=options) self.log.debug("UploadedTo result: %s" % result) - if "limit-dl" in result: + if "limit-size" in result: + self.fail("File too big for free download") + elif "limit-slot" in result: # Temporary restriction so just wait a bit + self.setWait(30 * 60, True) + self.wait() + self.retry() + elif "limit-parallel" in result: + self.fail("Cannot download in parallel") + elif "limit-dl" in result: self.setWait(30 * 60, True) self.wait() self.retry() elif 'err:"captcha"' in result: self.invalidCaptcha() elif "type:'download'" in result: + self.correctCaptcha() downloadURL = re.search("url:'([^']+)", result).group(1) break if not downloadURL: - self.fail("No Download url retrieved") + self.fail("No Download url retrieved/all captcha attempts failed") self.download(downloadURL) -- cgit v1.2.3