diff options
Diffstat (limited to 'module/plugins/crypter/LinkSaveIn.py')
-rw-r--r-- | module/plugins/crypter/LinkSaveIn.py | 16 |
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 |