summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hoster/LetitbitNet.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-03 17:40:27 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-03 17:40:27 +0200
commitcdd7d2db6b372a38a6b4281f19881b95aa5b7a50 (patch)
tree9b9e29d2f85e99ef558f49d3c33ebad6ff69552c /pyload/plugins/hoster/LetitbitNet.py
parentChanged XFileSharingPro and UpdateManager to internal plugins (diff)
parent[Dev-Host] Improve patterns a bit (diff)
downloadpyload-cdd7d2db6b372a38a6b4281f19881b95aa5b7a50.tar.xz
Merge branch 'stable' into 0.4.10
Conflicts: pyload/plugins/ocr/GigasizeCom.py pyload/plugins/ocr/LinksaveIn.py pyload/plugins/ocr/NetloadIn.py pyload/plugins/ocr/ShareonlineBiz.py
Diffstat (limited to 'pyload/plugins/hoster/LetitbitNet.py')
-rw-r--r--pyload/plugins/hoster/LetitbitNet.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pyload/plugins/hoster/LetitbitNet.py b/pyload/plugins/hoster/LetitbitNet.py
index b9631d311..7e01a120f 100644
--- a/pyload/plugins/hoster/LetitbitNet.py
+++ b/pyload/plugins/hoster/LetitbitNet.py
@@ -50,7 +50,6 @@ class LetitbitNet(SimpleHoster):
SECONDS_PATTERN = r'seconds\s*=\s*(\d+);'
CAPTCHA_CONTROL_FIELD = r"recaptcha_control_field\s=\s'(?P<value>[^']+)'"
- RECAPTCHA_KEY = "6Lc9zdMSAAAAAF-7s2wuQ-036pLRbM0p8dDaQdAM"
def setup(self):
@@ -108,7 +107,13 @@ class LetitbitNet(SimpleHoster):
self.logDebug(response)
recaptcha = ReCaptcha(self)
- challenge, response = recaptcha.challenge(self.RECAPTCHA_KEY)
+
+ captcha_key = recaptcha.detect_key()
+ if captcha_key is None:
+ self.parseError("ReCaptcha key not found")
+
+ challenge, response = recaptcha.challenge(captcha_key)
+
post_data = {"recaptcha_challenge_field": challenge, "recaptcha_response_field": response,
"recaptcha_control_field": recaptcha_control_field}
self.logDebug("Post data to send", post_data)