diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-19 11:32:25 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-19 11:32:25 +0200 |
commit | f60e99b1091074100e4722bc3b5cd6556377ec42 (patch) | |
tree | 1026d27173c908973e4f4c9daee450a1d327b1cb /module | |
parent | wupload fix, rslayercom update (diff) | |
download | pyload-f60e99b1091074100e4722bc3b5cd6556377ec42.tar.xz |
cleaned rslayer plugin
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/crypter/RSLayerCom.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/module/plugins/crypter/RSLayerCom.py b/module/plugins/crypter/RSLayerCom.py index 14d8ced4c..6e4266f2e 100644 --- a/module/plugins/crypter/RSLayerCom.py +++ b/module/plugins/crypter/RSLayerCom.py @@ -20,29 +20,30 @@ class RSLayerCom(Crypter): def decrypt(self, pyfile): url = pyfile.url src = self.req.load(str(url)) - + soup = BeautifulSoup(src) - captchaTag = soup.find("img", attrs={"id":"captcha_image"}) + captchaTag = soup.find("img", attrs={"id": "captcha_image"}) if captchaTag: - captchaUrl = "http://rs-layer.com/"+captchaTag["src"] - self.log.debug("Captcha URL: %s" % captchaUrl) + captchaUrl = "http://rs-layer.com/" + captchaTag["src"] + self.logDebug("Captcha URL: %s" % captchaUrl) result = self.decryptCaptcha(str(captchaUrl), imgtype="png") - captchaInput = soup.find("input", attrs={"id":"captcha"}) + captchaInput = soup.find("input", attrs={"id": "captcha"}) self.req.lastUrl = url src = self.req.load(str(url), post={'captcha_input': result, 'image_name': captchaTag["src"]}) - + link_ids = re.findall(r"onclick=\"getFile\(\'([0-9]{7}-.{8})\'\);changeBackgroundColor", src) if not len(link_ids) > 0: self.retry() - + self.correctCaptcha() - + links = [] for id in link_ids: - self.log.debug("ID: %s" % id) - new_link = unescape(re.search(r"<iframe style=\"width: 100%; height: 100%;\" src=\"(.*)\"></frame>", self.req.load("http://rs-layer.com/link-" + id + ".html")).group(1)) - self.log.debug("Link: %s" % new_link) + self.logDebug("ID: %s" % id) + new_link = unescape(re.search(r"<iframe style=\"width: 100%; height: 100%;\" src=\"(.*)\"></frame>", + self.req.load("http://rs-layer.com/link-" + id + ".html")).group(1)) + self.logDebug("Link: %s" % new_link) links.append(new_link) self.packages.append((self.pyfile.package().name, links, self.pyfile.package().folder)) |