From aaa01255c938604a1df090edb570a1df1e7800e2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 17 Feb 2014 22:08:40 +0100 Subject: Hoster: RyushareCom: Free dl fix (thx nomad71) --- module/plugins/hoster/RyushareCom.py | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) (limited to 'module/plugins/hoster/RyushareCom.py') diff --git a/module/plugins/hoster/RyushareCom.py b/module/plugins/hoster/RyushareCom.py index 675eaddde..77efa0081 100644 --- a/module/plugins/hoster/RyushareCom.py +++ b/module/plugins/hoster/RyushareCom.py @@ -12,11 +12,11 @@ from module.plugins.internal.CaptchaService import SolveMedia class RyushareCom(XFileSharingPro): __name__ = "RyushareCom" __type__ = "hoster" - __pattern__ = r"http://(?:\w*\.)*?ryushare.com/\w{11,}" - __version__ = "0.13" + __pattern__ = r"http://(?:www\.)?ryushare\.com/\w+" + __version__ = "0.14" __description__ = """ryushare.com hoster plugin""" - __author_name__ = ("zoidberg", "stickell","quareevo") - __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it","quareevo@arcor.de") + __author_name__ = ("zoidberg", "stickell", "quareevo") + __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it", "quareevo@arcor.de") HOSTER_NAME = "ryushare.com" @@ -24,13 +24,6 @@ class RyushareCom(XFileSharingPro): DIRECT_LINK_PATTERN = r'(http://([^/]*?ryushare.com|\d+\.\d+\.\d+\.\d+)(:\d+/d/|/files/\w+/\w+/)[^"\'<]+)' SOLVEMEDIA_PATTERN = r'http:\/\/api\.solvemedia\.com\/papi\/challenge\.script\?k=(.*?)"' - def setup(self): - self.resumeDownload = self.multiDL = True - if not self.premium: - self.limitDL = 2 - # Up to 3 chunks allowed in free downloads. Unknown for premium - self.chunkLimit = 3 - def getDownloadLink(self): retry = False self.html = self.load(self.pyfile.url) @@ -42,15 +35,15 @@ class RyushareCom(XFileSharingPro): action, inputs = self.parseHtmlForm('F1') self.setWait(65) - # Wait + # Wait 1 hour if 'You have reached the download-limit!!!' in self.html: - self.setWait(3600, True) + self.setWait(1 * 60 * 60, True) retry = True - + match = re.search(self.WAIT_PATTERN, self.html) if match: m = match.groupdict(0) - waittime = int(m["hour"])*60*60 + int(m['min']) * 60 + int(m['sec']) + waittime = int(m["hour"]) * 60 * 60 + int(m['min']) * 60 + int(m['sec']) self.setWait(waittime, True) retry = True @@ -59,7 +52,6 @@ class RyushareCom(XFileSharingPro): self.retry() for i in xrange(5): - m = re.search(self.SOLVEMEDIA_PATTERN, self.html) if not m: self.parseError("Error parsing captcha") @@ -71,14 +63,13 @@ class RyushareCom(XFileSharingPro): inputs["adcopy_challenge"] = challenge inputs["adcopy_response"] = response - self.html = self.load(self.pyfile.url, post = inputs) + 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") @@ -86,4 +77,5 @@ class RyushareCom(XFileSharingPro): m = re.search(r'Click here to download', self.html) return m.group(1) + getInfo = create_getInfo(RyushareCom) -- cgit v1.2.3