summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/KingfilesNet.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/KingfilesNet.py
parent[MovReelCom] Fixed LINK_PATTERN (diff)
downloadpyload-23ae563604dca1dae262fbc598154b99b2f1eae8.tar.xz
Update plugins after CaptchaService and XFileSharingPro changes
Diffstat (limited to 'module/plugins/hoster/KingfilesNet.py')
-rw-r--r--module/plugins/hoster/KingfilesNet.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/module/plugins/hoster/KingfilesNet.py b/module/plugins/hoster/KingfilesNet.py
index 4d87a5933..66a639a14 100644
--- a/module/plugins/hoster/KingfilesNet.py
+++ b/module/plugins/hoster/KingfilesNet.py
@@ -27,7 +27,6 @@ class KingfilesNet(SimpleHoster):
RAND_ID_PATTERN = r'type=\"hidden\" name=\"rand\" value=\"(.+)\">'
LINK_PATTERN = r'var download_url = \'(.+)\';'
- SOLVEMEDIA_PATTERN = r'http://api\.solvemedia\.com/papi/challenge\.script\?k=(.+)\">'
def setup(self):
@@ -50,13 +49,12 @@ class KingfilesNet(SimpleHoster):
'method_free': "+"}
b = self.load(self.pyfile.url, post=post_data, cookies=True, decode=True)
- # Do the captcha stuff
- m = re.search(self.SOLVEMEDIA_PATTERN, b)
- if m is None:
- self.parseError("Captcha key not found")
-
solvemedia = SolveMedia(self)
- captcha_key = m.group(1)
+
+ captcha_key = solvemedia.detect_key()
+ if captcha_key is None:
+ self.parseError("SolveMedia key not found")
+
self.logDebug("captcha_key", captcha_key)
captcha_challenge, captcha_response = solvemedia.challenge(captcha_key)