diff options
| author | 2015-10-02 10:09:26 +0200 | |
|---|---|---|
| committer | 2015-10-02 10:09:26 +0200 | |
| commit | 3a08656c5665f4b8db98744fb323e64b8630e084 (patch) | |
| tree | 28f9f62ffc57888b76ca32540dbf5af3a4cfc8d0 /module/plugins/crypter/LixIn.py | |
| parent | Merge pull request #1 from pyload/stable (diff) | |
| parent | [Account] Improve parse_traffic method + code cosmetics (diff) | |
| download | pyload-3a08656c5665f4b8db98744fb323e64b8630e084.tar.xz | |
Merge pull request #2 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/crypter/LixIn.py')
| -rw-r--r-- | module/plugins/crypter/LixIn.py | 17 | 
1 files changed, 7 insertions, 10 deletions
| diff --git a/module/plugins/crypter/LixIn.py b/module/plugins/crypter/LixIn.py index 2d26564e8..ecc92a8d3 100644 --- a/module/plugins/crypter/LixIn.py +++ b/module/plugins/crypter/LixIn.py @@ -43,16 +43,13 @@ class LixIn(Crypter):              self.error(_("Link doesn't seem valid"))          m = re.search(self.CAPTCHA_PATTERN, self.html) -        if m: -            for _i in xrange(5): -                m = re.search(self.CAPTCHA_PATTERN, self.html) -                if m: -                    self.log_debug("Trying captcha") -                    captcharesult = self.captcha.decrypt(urlparse.urljoin("http://lix.in/", m.group(1))) -                self.html = self.load(url, -                                          post={'capt': captcharesult, 'submit': "submit", 'tiny': id}) -            else: -                self.log_debug("No captcha/captcha solved") +        if m is not None: +            captcharesult = self.captcha.decrypt(urlparse.urljoin("http://lix.in/", m.group(1))) +            self.html = self.load(url, post={'capt': captcharesult, 'submit': "submit", 'tiny': id}) + +            if re.search(self.CAPTCHA_PATTERN, self.html): +                self.fail(_("No captcha solved")) +          else:              self.html = self.load(url, post={'submit': "submit", 'tiny': id}) | 
