summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-10-31 16:39:45 +0100
committerGravatar Stefano <l.stickell@yahoo.it> 2013-10-31 16:39:45 +0100
commitcc5be0a68ed2087da3cc2c3c39d7f8fa7f609811 (patch)
tree9078725cc956dd51e7d4dd1f5e64c6ef3b4cdacc /module/plugins/hoster
parentCaptcha9kw: merged #356 (diff)
downloadpyload-cc5be0a68ed2087da3cc2c3c39d7f8fa7f609811.tar.xz
Keep2share: added k2s.cc support
see #92
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/Keep2shareCC.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/module/plugins/hoster/Keep2shareCC.py b/module/plugins/hoster/Keep2shareCC.py
index 5e4f5f540..2eada84ec 100644
--- a/module/plugins/hoster/Keep2shareCC.py
+++ b/module/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"http://(?:www\.)?(?:keep2share|k2s)\.cc/file/(?P<ID>.+)"
+ __version__ = "0.04"
__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})