diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-10 01:51:06 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-10 01:51:06 +0100 |
commit | 21446b75ee240f2aee137aa1998ee0184fe47bf4 (patch) | |
tree | 263e4811147ba0c4e2ae043d7a48b332c61b4690 /module/plugins/hoster/RyushareCom.py | |
parent | [PremiumTo] Parse Special Traffic (diff) | |
download | pyload-21446b75ee240f2aee137aa1998ee0184fe47bf4.tar.xz |
[RyushareCom] Update
Diffstat (limited to 'module/plugins/hoster/RyushareCom.py')
-rw-r--r-- | module/plugins/hoster/RyushareCom.py | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/module/plugins/hoster/RyushareCom.py b/module/plugins/hoster/RyushareCom.py deleted file mode 100644 index 0964c51fc..000000000 --- a/module/plugins/hoster/RyushareCom.py +++ /dev/null @@ -1,80 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Test links: -# http://ryushare.com/cl0jy8ric2js/random.bin - -import re - -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo -from module.plugins.internal.CaptchaService import SolveMedia - - -class RyushareCom(XFSHoster): - __name__ = "RyushareCom" - __type__ = "hoster" - __version__ = "0.20" - - __pattern__ = r'http://(?:www\.)?ryushare\.com/\w+' - - __description__ = """Ryushare.com hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz"), - ("stickell", "l.stickell@yahoo.it"), - ("quareevo", "quareevo@arcor.de")] - - - HOSTER_DOMAIN = "ryushare.com" - - WAIT_PATTERN = r'You have to wait ((?P<H>\d+) hour[s]?, )?((?P<M>\d+) minute[s], )?(?P<S>\d+) second[s]' - - LINK_PATTERN = r'<a href="([^"]+)">Click here to download<' - - - def getDownloadLink(self): - retry = False - self.html = self.load(self.pyfile.url) - action, inputs = self.parseHtmlForm(input_names={"op": re.compile("^download")}) - if "method_premium" in inputs: - del inputs['method_premium'] - - self.html = self.load(self.pyfile.url, post=inputs) - action, inputs = self.parseHtmlForm('F1') - - self.setWait(65) - # Wait 1 hour - if "You have reached the download-limit" in self.html: - self.setWait(1 * 60 * 60, True) - retry = True - - m = re.search(self.WAIT_PATTERN, self.html) - if m: - wait = m.groupdict(0) - waittime = int(wait['H']) * 60 * 60 + int(wait['M']) * 60 + int(wait['S']) - self.setWait(waittime, True) - retry = True - - self.wait() - if retry: - self.retry() - - for _i in xrange(5): - solvemedia = SolveMedia(self) - challenge, response = solvemedia.challenge() - - inputs['adcopy_challenge'] = challenge - inputs['adcopy_response'] = response - - self.html = self.load(self.pyfile.url, post=inputs) - if "WRONG CAPTCHA" in self.html: - self.invalidCaptcha() - else: - self.correctCaptcha() - break - else: - 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) - - -getInfo = create_getInfo(RyushareCom) |