summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/LixIn.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-01 04:55:17 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-01 04:55:17 +0200
commit25d5726d4953b93a2e286fd6af8d4ead20670ba6 (patch)
tree9d38f6942af2fadc094a75dd43699051f356b4d7 /module/plugins/crypter/LixIn.py
parent[AntiVirus] Folder support (diff)
downloadpyload-25d5726d4953b93a2e286fd6af8d4ead20670ba6.tar.xz
A lot of plugin code cosmetics
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})