summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/CatShareNet.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-03 09:06:05 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-03 09:09:53 +0200
commit23ae563604dca1dae262fbc598154b99b2f1eae8 (patch)
tree1540b988d133c052bf0d6e7f26f02324db6f944a /module/plugins/hoster/CatShareNet.py
parent[MovReelCom] Fixed LINK_PATTERN (diff)
downloadpyload-23ae563604dca1dae262fbc598154b99b2f1eae8.tar.xz
Update plugins after CaptchaService and XFileSharingPro changes
Diffstat (limited to 'module/plugins/hoster/CatShareNet.py')
-rw-r--r--module/plugins/hoster/CatShareNet.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py
index 121973e4d..6bfbe0f1a 100644
--- a/module/plugins/hoster/CatShareNet.py
+++ b/module/plugins/hoster/CatShareNet.py
@@ -25,7 +25,6 @@ class CatShareNet(SimpleHoster):
IP_BLOCKED_PATTERN = r'>Nasz serwis wykrył że Twój adres IP nie pochodzi z Polski.<'
SECONDS_PATTERN = 'var\scount\s=\s(\d+);'
- RECAPTCHA_KEY = "6Lfln9kSAAAAANZ9JtHSOgxUPB9qfDFeLUI_QMEy"
LINK_PATTERN = r'<form action="(.+?)" method="GET">'
@@ -48,7 +47,12 @@ class CatShareNet(SimpleHoster):
self.wait(wait_time, True)
recaptcha = ReCaptcha(self)
- challenge, code = recaptcha.challenge(self.RECAPTCHA_KEY)
+
+ captcha_key = recaptcha.detect_key()
+ if captcha_key is None:
+ self.parseError("ReCaptcha key not found")
+
+ challenge, code = recaptcha.challenge(captcha_key)
self.html = self.load(self.pyfile.url,
post={'recaptcha_challenge_field': challenge,
'recaptcha_response_field': code})