diff options
author | LePastis <truchet.matthieu@gmail.com> | 2015-01-04 00:39:32 +0100 |
---|---|---|
committer | LePastis <truchet.matthieu@gmail.com> | 2015-01-04 00:39:32 +0100 |
commit | 4914e1b3c0db27fa3d82f5a486319acb18daa30c (patch) | |
tree | 90a3461cc0f3d5c1a5ae4f596e4a2bfdb15d02ca /module/plugins/crypter/DlProtectCom.py | |
parent | [OverLoadMe] Code cosmetics (diff) | |
download | pyload-4914e1b3c0db27fa3d82f5a486319acb18daa30c.tar.xz |
Update DlProtectCom.py
Hello
Frist, I'm a French guy so sorry for my English.
I have made some fix for the DlProtect crypter :
- Remove '>' at the start of string to search in the html page
- Chage field name on form
- Add a loop to wait 'Continue' button on the form.
I stay 1 bug, because for me the message was in French in the page ('Please click on continue to see the content' => 'Cliquez sur continuer pour voir le(s) lien(s)'). I don't not how to manage multi-language in the crypter.
Diffstat (limited to 'module/plugins/crypter/DlProtectCom.py')
-rw-r--r-- | module/plugins/crypter/DlProtectCom.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index a99ed0be9..93ad8bffc 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class DlProtectCom(SimpleCrypter): __name__ = "DlProtectCom" __type__ = "crypter" - __version__ = "0.01" + __version__ = "0.02" __pattern__ = r'http://(?:www\.)?dl-protect\.com/((en|fr)/)?(?P<ID>\w+)' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), @@ -22,7 +22,7 @@ class DlProtectCom(SimpleCrypter): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - OFFLINE_PATTERN = r'>Unfortunately, the link you are looking for is not found' + OFFLINE_PATTERN = r'Unfortunately, the link you are looking for is not found' def getLinks(self): @@ -31,13 +31,16 @@ class DlProtectCom(SimpleCrypter): return [self.req.http.lastEffectiveURL] #id = re.match(self.__pattern__, self.pyfile.url).group('ID') - key = re.search(r'name="id_key" value="(.+?)"', self.html).group(1) + key = re.search(r'name="key" value="(.+?)"', self.html).group(1) - post_req = {"id_key": key, "submitform": ""} + post_req = {"key": key, "submitform": ""} if self.OFFLINE_PATTERN in self.html: self.offline() - elif ">Please click on continue to see the content" in self.html: + elif "Please click on continue to see the content" in self.html: + while not re.match(r'id="btn-continue" type="submit" value="Continue"', self.html): + self.setWait(1) + self.wait() post_req.update({"submitform": "Continue"}) else: mstime = int(round(time() * 1000)) @@ -45,10 +48,10 @@ class DlProtectCom(SimpleCrypter): post_req.update({"i": b64time, "submitform": "Decrypt+link"}) - if ">Password :" in self.html: + if "Password :" in self.html: post_req['pwd'] = self.getPassword() - if ">Security Code" in self.html: + 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") @@ -57,7 +60,7 @@ class DlProtectCom(SimpleCrypter): self.html = self.load(self.pyfile.url, post=post_req) - for errmsg in (">The password is incorrect", ">The security code is incorrect"): + for errmsg in ("The password is incorrect", "The security code is incorrect"): if errmsg in self.html: self.fail(_(errmsg[1:])) |