From d5d580b693af56d286008da47a3e30bdc5f79aed Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 12 Mar 2011 11:32:50 +0100 Subject: closed #246, #247, #248, #249, --- module/plugins/hoster/FilesonicCom.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/FilesonicCom.py') diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py index 1d5a5ceef..97060d36e 100644 --- a/module/plugins/hoster/FilesonicCom.py +++ b/module/plugins/hoster/FilesonicCom.py @@ -16,7 +16,6 @@ def getInfo(urls): found = re.findall(r'\s+([^<]+)\s+([^<]+)\s+([0-9]+) MB\s+\s+([^<]+)
\s+
\s+\s+', page, re.MULTILINE) result = [] for src, name, size, status in found: - print src, name, size, status result.append((name, int(size)*1024*1024, 2 if status == "Available" else 1, src)) @@ -91,7 +90,9 @@ class FilesonicCom(Hoster): self.fail("implement need pw") chall = re.search(r'Recaptcha.create\("(.*?)",', self.html) - if chall: + for i in range(5): + if not chall: break + re_captcha = ReCaptcha(self) challenge, result = re_captcha.challenge(chall.group(1)) @@ -99,6 +100,10 @@ class FilesonicCom(Hoster): "recaptcha_response_field" : result} self.html = self.load(link, post=postData) + chall = re.search(r'Recaptcha.create\("(.*?)",', self.html) + + if chall: + self.invalidCaptcha() url = re.search(realLinkRegexp, self.html).group(1) return url -- cgit v1.2.3