diff options
Diffstat (limited to 'pyload/plugins/hoster/RyushareCom.py')
-rw-r--r-- | pyload/plugins/hoster/RyushareCom.py | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/pyload/plugins/hoster/RyushareCom.py b/pyload/plugins/hoster/RyushareCom.py index 6c08e5cd7..f41e4bfbf 100644 --- a/pyload/plugins/hoster/RyushareCom.py +++ b/pyload/plugins/hoster/RyushareCom.py @@ -5,26 +5,27 @@ import re -from pyload.plugins.internal.XFSPHoster import XFSPHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo from pyload.plugins.internal.CaptchaService import SolveMedia -class RyushareCom(XFSPHoster): - __name__ = "RyushareCom" - __type__ = "hoster" - __version__ = "0.16" +class RyushareCom(XFSHoster): + __name__ = "RyushareCom" + __type__ = "hoster" + __version__ = "0.20" __pattern__ = r'http://(?:www\.)?ryushare\.com/\w+' __description__ = """Ryushare.com hoster plugin""" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz"), - ("stickell", "l.stickell@yahoo.it"), - ("quareevo", "quareevo@arcor.de")] + __license__ = "GPLv3" + __authors__ = [("zoidberg", "zoidberg@mujmail.cz"), + ("stickell", "l.stickell@yahoo.it"), + ("quareevo", "quareevo@arcor.de")] - HOSTER_NAME = "ryushare.com" + HOSTER_DOMAIN = "ryushare.com" - FILE_SIZE_PATTERN = r'You have requested <font color="red">[^<]+</font> \((?P<S>[\d\.]+) (?P<U>\w+)' + SIZE_PATTERN = r'You have requested <font color="red">[^<]+</font> \((?P<S>[\d.,]+) (?P<U>[\w^_]+)' 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<' @@ -57,14 +58,9 @@ class RyushareCom(XFSPHoster): if retry: self.retry() - for _ in xrange(5): - captcha = SolveMedia(self) - - captcha_key = captcha.detect_key() - if captcha_key is None: - self.parseError("SolveMedia key not found") - - challenge, response = captcha.challenge(captcha_key) + for _i in xrange(5): + solvemedia = SolveMedia(self) + challenge, response = solvemedia.challenge() inputs['adcopy_challenge'] = challenge inputs['adcopy_response'] = response @@ -72,12 +68,11 @@ class RyushareCom(XFSPHoster): self.html = self.load(self.pyfile.url, post=inputs) if "WRONG CAPTCHA" in self.html: self.invalidCaptcha() - self.logInfo("Invalid Captcha") else: self.correctCaptcha() break else: - self.fail("You have entered 5 invalid captcha codes") + self.fail(_("You have entered 5 invalid captcha codes")) if "Click here to download" in self.html: return re.search(r'<a href="([^"]+)">Click here to download</a>', self.html).group(1) |