summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/LinkdecrypterCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/crypter/LinkdecrypterCom.py')
-rw-r--r--module/plugins/crypter/LinkdecrypterCom.py25
1 files changed, 13 insertions, 12 deletions
diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py
index 0704214d0..d8812dbd5 100644
--- a/module/plugins/crypter/LinkdecrypterCom.py
+++ b/module/plugins/crypter/LinkdecrypterCom.py
@@ -2,13 +2,14 @@
import re
-from module.plugins.Crypter import Crypter
+from module.plugins.internal.MultiCrypter import MultiCrypter
-class LinkdecrypterCom(Crypter):
+class LinkdecrypterCom(MultiCrypter):
__name__ = "LinkdecrypterCom"
__type__ = "crypter"
- __version__ = "0.29"
+ __version__ = "0.32"
+ __status__ = "testing"
__pattern__ = r'^unmatchable$'
__config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True),
@@ -27,15 +28,15 @@ class LinkdecrypterCom(Crypter):
def setup(self):
- self.password = self.getPassword()
+ self.password = self.get_password()
self.req.setOption("timeout", 300)
def decrypt(self, pyfile):
retries = 5
- post_dict = {"link_cache": "on", "pro_links": pyfile.url, "modo_links": "text"}
- self.html = self.load('http://linkdecrypter.com/', post=post_dict, decode=True)
+ post_dict = {'link_cache': "on", 'pro_links': pyfile.url, 'modo_links': "text"}
+ self.html = self.load('http://linkdecrypter.com/', post=post_dict)
while retries:
m = re.search(self.TEXTAREA_PATTERN, self.html, re.S)
@@ -49,21 +50,21 @@ class LinkdecrypterCom(Crypter):
m = re.search(r"<p><i><b>([^<]+)</b></i></p>", self.html)
msg = m.group(1) if m else ""
- self.logInfo(_("Captcha protected link"), result_type, msg)
+ self.log_info(_("Captcha protected link"), result_type, msg)
- captcha = self.decryptCaptcha(captcha_url, result_type=result_type)
+ captcha = self.captcha.decrypt(captcha_url, output_type=result_type)
if result_type == "positional":
captcha = "%d|%d" % captcha
- self.html = self.load('http://linkdecrypter.com/', post={"captcha": captcha}, decode=True)
+ self.html = self.load('http://linkdecrypter.com/', post={'captcha': captcha})
retries -= 1
elif self.PASSWORD_PATTERN in self.html:
if self.password:
- self.logInfo(_("Password protected link"))
- self.html = self.load('http://linkdecrypter.com/', post={'password': self.password}, decode=True)
+ self.log_info(_("Password protected link"))
+ self.html = self.load('http://linkdecrypter.com/', post={'password': self.password})
else:
self.fail(_("Missing password"))
else:
retries -= 1
- self.html = self.load('http://linkdecrypter.com/', decode=True)
+ self.html = self.load('http://linkdecrypter.com/')