summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/Keep2ShareCc.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-22 21:31:19 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-22 21:31:19 +0100
commitcf4ded052964047de88d676045329b8fa4fca2dc (patch)
tree5864aad4f34b273044018393b6bb9be690162050 /module/plugins/hoster/Keep2ShareCc.py
parent[CaptchaService] Merge together ReCaptcha versions (diff)
downloadpyload-cf4ded052964047de88d676045329b8fa4fca2dc.tar.xz
Update plugins after CaptchaService changes
Diffstat (limited to 'module/plugins/hoster/Keep2ShareCc.py')
-rw-r--r--module/plugins/hoster/Keep2ShareCc.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/module/plugins/hoster/Keep2ShareCc.py b/module/plugins/hoster/Keep2ShareCc.py
index d02b9f709..34bc3de54 100644
--- a/module/plugins/hoster/Keep2ShareCc.py
+++ b/module/plugins/hoster/Keep2ShareCc.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class Keep2ShareCc(SimpleHoster):
__name__ = "Keep2ShareCc"
__type__ = "hoster"
- __version__ = "0.20"
+ __version__ = "0.21"
__pattern__ = r'https?://(?:www\.)?(keep2share|k2s|keep2s)\.cc/file/(?P<ID>\w+)'
@@ -29,7 +29,8 @@ class Keep2ShareCc(SimpleHoster):
OFFLINE_PATTERN = r'File not found or deleted|Sorry, this file is blocked or deleted|Error 404'
TEMP_OFFLINE_PATTERN = r'Downloading blocked due to'
- LINK_FREE_PATTERN = LINK_PREMIUM_PATTERN = r'"([^"]+url.html?file=.+?)"|window\.location\.href = \'(.+?)\';'
+ LINK_FREE_PATTERN = r'"([^"]+url.html?file=.+?)"|window\.location\.href = \'(.+?)\';'
+ LINK_PREMIUM_PATTERN = r'window\.location\.href = \'(.+?)\';'
CAPTCHA_PATTERN = r'src="(/file/captcha\.html.+?)"'
@@ -77,9 +78,7 @@ class Keep2ShareCc(SimpleHoster):
self.wait(30)
- self.html = self.load(pyfile.url, post={'uniqueId': self.fid, 'free': 1})
-
- self.checkErrors()
+ self.html = self.load(pyfile.url)
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m is None:
@@ -100,13 +99,13 @@ class Keep2ShareCc(SimpleHoster):
captcha_url = urljoin("http://k2s.cc/", m.group(1))
post_data['CaptchaForm[code]'] = self.decryptCaptcha(captcha_url)
else:
- challenge, response = recaptcha.challenge()
+ response, challenge = recaptcha.challenge()
post_data.update({'recaptcha_challenge_field': challenge,
'recaptcha_response_field' : response})
self.html = self.load(self.pyfile.url, post=post_data)
- if 'recaptcha' not in self.html:
+ if 'verification code is incorrect' not in self.html:
self.correctCaptcha()
else:
self.invalidCaptcha()