summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hoster/RyushareCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-03 17:40:27 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-03 17:40:27 +0200
commitcdd7d2db6b372a38a6b4281f19881b95aa5b7a50 (patch)
tree9b9e29d2f85e99ef558f49d3c33ebad6ff69552c /pyload/plugins/hoster/RyushareCom.py
parentChanged XFileSharingPro and UpdateManager to internal plugins (diff)
parent[Dev-Host] Improve patterns a bit (diff)
downloadpyload-cdd7d2db6b372a38a6b4281f19881b95aa5b7a50.tar.xz
Merge branch 'stable' into 0.4.10
Conflicts: pyload/plugins/ocr/GigasizeCom.py pyload/plugins/ocr/LinksaveIn.py pyload/plugins/ocr/NetloadIn.py pyload/plugins/ocr/ShareonlineBiz.py
Diffstat (limited to 'pyload/plugins/hoster/RyushareCom.py')
-rw-r--r--pyload/plugins/hoster/RyushareCom.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/pyload/plugins/hoster/RyushareCom.py b/pyload/plugins/hoster/RyushareCom.py
index 9641bf6e5..bd264f087 100644
--- a/pyload/plugins/hoster/RyushareCom.py
+++ b/pyload/plugins/hoster/RyushareCom.py
@@ -26,7 +26,6 @@ class RyushareCom(XFileSharingPro):
WAIT_PATTERN = r'You have to wait ((?P<hour>\d+) hour[s]?, )?((?P<min>\d+) minute[s], )?(?P<sec>\d+) second[s]'
LINK_PATTERN = r'<a href="([^"]+)">Click here to download<'
- SOLVEMEDIA_PATTERN = r'http:\/\/api\.solvemedia\.com\/papi\/challenge\.script\?k=(.*?)"'
def getDownloadLink(self):
@@ -57,13 +56,13 @@ class RyushareCom(XFileSharingPro):
self.retry()
for _ in xrange(5):
- m = re.search(self.SOLVEMEDIA_PATTERN, self.html)
- if m is None:
- self.parseError("Error parsing captcha")
-
- captchaKey = m.group(1)
captcha = SolveMedia(self)
- challenge, response = captcha.challenge(captchaKey)
+
+ captcha_key = captcha.detect_key()
+ if captcha_key is None:
+ self.parseError("SolveMedia key not found")
+
+ challenge, response = captcha.challenge(captcha_key)
inputs['adcopy_challenge'] = challenge
inputs['adcopy_response'] = response