diff options
author | 2015-08-09 00:50:54 +0200 | |
---|---|---|
committer | 2015-08-09 00:50:54 +0200 | |
commit | b0ef3f1673e1930916604bb1264ca3a38414bc8d (patch) | |
tree | c97936e4d2a4cd6eb1072c65c8a08a7d18816b18 /module/plugins/crypter/DlProtectCom.py | |
parent | [XFileSharingPro][XFileSharingProFolder] Added default __pattern__ (diff) | |
parent | Fix https://github.com/pyload/pyload/issues/1707 (diff) | |
download | pyload-b0ef3f1673e1930916604bb1264ca3a38414bc8d.tar.xz |
Merge pull request #1 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/crypter/DlProtectCom.py')
-rw-r--r-- | module/plugins/crypter/DlProtectCom.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index a9f39c6f3..0c776ac61 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -11,7 +11,8 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class DlProtectCom(SimpleCrypter): __name__ = "DlProtectCom" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.05" + __status__ = "testing" __pattern__ = r'https?://(?:www\.)?dl-protect\.com/((en|fr)/)?\w+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -28,15 +29,15 @@ class DlProtectCom(SimpleCrypter): OFFLINE_PATTERN = r'Unfortunately, the link you are looking for is not found' - def getLinks(self): - # Direct link with redirect + def get_links(self): + #: Direct link with redirect if not re.match(r"https?://(?:www\.)?dl-protect\.com/.+", self.req.http.lastEffectiveURL): return [self.req.http.lastEffectiveURL] post_req = {'key' : re.search(r'name="key" value="(.+?)"', self.html).group(1), 'submitform': ""} - if "Please click on continue to see the content" in self.html: + if "Please click on continue to see the links" in self.html: post_req['submitform'] = "Continue" self.wait(2) @@ -48,14 +49,13 @@ class DlProtectCom(SimpleCrypter): 'submitform': "Decrypt+link"}) if "Password :" in self.html: - post_req['pwd'] = self.getPassword() + post_req['pwd'] = self.get_password() if "Security Code" in self.html: - captcha_id = re.search(r'/captcha\.php\?uid=(.+?)"', self.html).group(1) - captcha_url = "http://www.dl-protect.com/captcha.php?uid=" + captcha_id - captcha_code = self.decryptCaptcha(captcha_url, imgtype="gif") - - post_req['secure'] = captcha_code + m = re.search(r'/captcha\.php\?key=(.+?)"', self.html) + if m: + captcha_code = self.captcha.decrypt("http://www.dl-protect.com/captcha.php?key=" + m.group(1), input_type="gif") + post_req['secure'] = captcha_code self.html = self.load(self.pyfile.url, post=post_req) |