summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/LinkSaveIn.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-01-29 22:20:54 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-01-29 22:20:54 +0100
commit083127ffcb12e05eb95affa01a1c4e261271f1bb (patch)
tree8442c79fcc72a70b41148b46bb48dcdd8b0fe9d1 /module/plugins/crypter/LinkSaveIn.py
parentnew translations integrated, thanks to all translators (diff)
downloadpyload-083127ffcb12e05eb95affa01a1c4e261271f1bb.tar.xz
linksave and ncrypt working with captchas
Diffstat (limited to 'module/plugins/crypter/LinkSaveIn.py')
-rw-r--r--module/plugins/crypter/LinkSaveIn.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/module/plugins/crypter/LinkSaveIn.py b/module/plugins/crypter/LinkSaveIn.py
index c9621d658..2497b3693 100644
--- a/module/plugins/crypter/LinkSaveIn.py
+++ b/module/plugins/crypter/LinkSaveIn.py
@@ -26,6 +26,8 @@ class LinkSaveIn(Crypter):
if not self.fileExists():
self.offline()
+ self.checkCaptcha()
+
# Get package name and folder
(package_name, folder_name) = self.getPackageNameAndFolder()
@@ -87,4 +89,16 @@ class LinkSaveIn(Crypter):
# Log and return
self.log.debug("LinkSaveIn: Package has %d links" % len(links))
- return links \ No newline at end of file
+ return links
+
+ def checkCaptcha(self):
+
+ if "<b>Captcha:</b>" in self.html:
+
+ id = re.search(r'name="id" value="([^"]+)', self.html).group(1)
+ hash = re.search(r'name="hash" value="([^"]+)', self.html).group(1)
+ url = re.search(r'src=".(/captcha/cap.php\?hsh=[^"]+)', self.html).group(1)
+
+ value = self.decryptCaptcha("http://linksave.in"+url, forceUser=True)
+
+ self.html = self.load(self.pyfile.url, post={"id": id, "hash": hash, "code": value}) \ No newline at end of file