summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/hoster/Keep2ShareCc.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugin/hoster/Keep2ShareCc.py')
-rw-r--r--pyload/plugin/hoster/Keep2ShareCc.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/pyload/plugin/hoster/Keep2ShareCc.py b/pyload/plugin/hoster/Keep2ShareCc.py
index 67af087b7..6e70e3962 100644
--- a/pyload/plugin/hoster/Keep2ShareCc.py
+++ b/pyload/plugin/hoster/Keep2ShareCc.py
@@ -22,7 +22,7 @@ class Keep2ShareCc(SimpleHoster):
("Walter Purcaro", "vuolter@gmail.com")]
- URL_REPLACEMENTS = [(__pattern__ + ".*", "http://k2s.cc/file/\g<ID>")]
+ URL_REPLACEMENTS = [(__pattern__ + ".*", "http://keep2s.cc/file/\g<ID>")]
NAME_PATTERN = r'File: <span>(?P<N>.+)</span>'
SIZE_PATTERN = r'Size: (?P<S>[^<]+)</div>'
@@ -30,7 +30,7 @@ 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 = 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.+?)"'
@@ -67,18 +67,18 @@ class Keep2ShareCc(SimpleHoster):
def handleFree(self, pyfile):
- self.fid = re.search(r'<input type="hidden" name="slow_id" value="([^"]+)">', self.html).group(1)
+ self.fid = re.search(r'<input type="hidden" name="slow_id" value="(.+?)">', self.html).group(1)
self.html = self.load(pyfile.url, post={'yt0': '', 'slow_id': self.fid})
+ # self.logDebug(self.fid)
+ # self.logDebug(pyfile.url)
+
self.checkErrors()
m = re.search(self.LINK_FREE_PATTERN, self.html)
-
if m is None:
self.handleCaptcha()
-
- self.wait(30)
-
+ self.wait(31)
self.html = self.load(pyfile.url)
m = re.search(self.LINK_FREE_PATTERN, self.html)
@@ -87,17 +87,21 @@ class Keep2ShareCc(SimpleHoster):
self.link = m.group(1)
def handleCaptcha(self):
- recaptcha = ReCaptcha(self)
post_data = {'free' : 1,
'freeDownloadRequest': 1,
'uniqueId' : self.fid,
'yt0' : ''}
+ m = re.search(r'id="(captcha\-form)"', self.html)
+ self.logDebug("captcha-form found %s" % m)
+
m = re.search(self.CAPTCHA_PATTERN, self.html)
+ self.logDebug("CAPTCHA_PATTERN found %s" % m)
if m:
- captcha_url = urljoin("http://k2s.cc/", m.group(1))
+ captcha_url = urljoin("http://keep2s.cc/", m.group(1))
post_data['CaptchaForm[code]'] = self.decryptCaptcha(captcha_url)
else:
+ recaptcha = ReCaptcha(self)
response, challenge = recaptcha.challenge()
post_data.update({'recaptcha_challenge_field': challenge,
'recaptcha_response_field' : response})