summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/LixIn.py
diff options
context:
space:
mode:
authorGravatar jansohn <jansohn@users.noreply.github.com> 2015-10-02 10:09:26 +0200
committerGravatar jansohn <jansohn@users.noreply.github.com> 2015-10-02 10:09:26 +0200
commit3a08656c5665f4b8db98744fb323e64b8630e084 (patch)
tree28f9f62ffc57888b76ca32540dbf5af3a4cfc8d0 /module/plugins/crypter/LixIn.py
parentMerge pull request #1 from pyload/stable (diff)
parent[Account] Improve parse_traffic method + code cosmetics (diff)
downloadpyload-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.py17
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})