summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hoster/Keep2shareCC.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/hoster/Keep2shareCC.py')
-rw-r--r--pyload/plugins/hoster/Keep2shareCC.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/pyload/plugins/hoster/Keep2shareCC.py b/pyload/plugins/hoster/Keep2shareCC.py
index 5e4f5f540..d2a13e35b 100644
--- a/pyload/plugins/hoster/Keep2shareCC.py
+++ b/pyload/plugins/hoster/Keep2shareCC.py
@@ -15,6 +15,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
############################################################################
+# Test links (random.bin):
+# http://k2s.cc/file/527111edfb9ba/random.bin
+
import re
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
@@ -24,8 +27,8 @@ from module.plugins.internal.CaptchaService import ReCaptcha
class Keep2shareCC(SimpleHoster):
__name__ = "Keep2shareCC"
__type__ = "hoster"
- __pattern__ = r"http://(?:www\.)?keep2share\.cc/file/\w+"
- __version__ = "0.03"
+ __pattern__ = r"https?://(?:www\.)?(keep2share|k2s|keep2s)\.cc/file/(?P<ID>[a-zA-Z0-9]{13})"
+ __version__ = "0.05"
__description__ = """Keep2share.cc hoster plugin"""
__author_name__ = ("stickell")
__author_mail__ = ("l.stickell@yahoo.it")
@@ -39,6 +42,8 @@ class Keep2shareCC(SimpleHoster):
RECAPTCHA_KEY = '6LcYcN0SAAAAABtMlxKj7X0hRxOY8_2U86kI1vbb'
+ FILE_URL_REPLACEMENTS = [(__pattern__, r"http://www.keep2share.cc/file/\g<ID>")]
+
def handleFree(self):
fid = re.search(r'<input type="hidden" name="slow_id" value="([^"]+)">', self.html).group(1)
self.html = self.load(self.pyfile.url, post={'yt0': '', 'slow_id': fid})
@@ -46,7 +51,7 @@ class Keep2shareCC(SimpleHoster):
m = re.search(self.WAIT_PATTERN, self.html)
if m:
wait_string = m.group(1)
- wait_time = int(wait_string[0:2]) * 3600 + int(wait_string[3:5]) * 60 + int(wait_string[6:8])
+ wait_time = int(wait_string[0:2]) * 60 * 60 + int(wait_string[3:5]) * 60 + int(wait_string[6:8])
self.setWait(wait_time, True)
self.wait()
self.process(self.pyfile)