summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/DepositfilesCom.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/DepositfilesCom.py
parent[MovReelCom] Fixed LINK_PATTERN (diff)
downloadpyload-23ae563604dca1dae262fbc598154b99b2f1eae8.tar.xz
Update plugins after CaptchaService and XFileSharingPro changes
Diffstat (limited to 'module/plugins/hoster/DepositfilesCom.py')
-rw-r--r--module/plugins/hoster/DepositfilesCom.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py
index 9ff8c22a1..459096f96 100644
--- a/module/plugins/hoster/DepositfilesCom.py
+++ b/module/plugins/hoster/DepositfilesCom.py
@@ -29,8 +29,6 @@ class DepositfilesCom(SimpleHoster):
COOKIES = [(".dfiles.eu", "lang_current", "en")]
- RECAPTCHA_PATTERN = r"Recaptcha.create\('([^']+)'"
-
FREE_LINK_PATTERN = r'<form id="downloader_file_form" action="(http://.+?\.(dfiles\.eu|depositfiles\.com)/.+?)" method="post"'
PREMIUM_LINK_PATTERN = r'class="repeat"><a href="(.+?)"'
PREMIUM_MIRROR_PATTERN = r'class="repeat_mirror"><a href="(.+?)"'
@@ -67,21 +65,16 @@ class DepositfilesCom(SimpleHoster):
params = {'fid': m.group(1)}
self.logDebug("FID: %s" % params['fid'])
- captcha_key = '6LdRTL8SAAAAAE9UOdWZ4d0Ky-aeA7XfSqyWDM2m'
- m = re.search(self.RECAPTCHA_PATTERN, self.html)
- if m:
- captcha_key = m.group(1)
- self.logDebug("CAPTCHA_KEY: %s" % captcha_key)
-
self.wait()
recaptcha = ReCaptcha(self)
+ captcha_key = recaptcha.detect_key()
+ if captcha_key is None:
+ self.parseError("ReCaptcha key not found")
for _ in xrange(5):
self.html = self.load("https://dfiles.eu/get_file.php", get=params)
if '<input type=button value="Continue" onclick="check_recaptcha' in self.html:
- if not captcha_key:
- self.parseError('Captcha key')
if 'response' in params:
self.invalidCaptcha()
params['challenge'], params['response'] = recaptcha.challenge(captcha_key)