diff options
author | Stefano <l.stickell@yahoo.it> | 2013-03-15 22:04:59 +0100 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-03-15 22:04:59 +0100 |
commit | abd53b0f3463b8d6f720c506d3abbf10c881d926 (patch) | |
tree | b406741ef1e59dce75a94d669aaf7496df3a15d9 /module | |
parent | SpeedLoadOrg: now premium downloads works (diff) | |
download | pyload-abd53b0f3463b8d6f720c506d3abbf10c881d926.tar.xz |
RyushareCom: Fixed free download
http://forum.pyload.org/viewtopic.php?p=8254#p8254
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hoster/RyushareCom.py | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/module/plugins/hoster/RyushareCom.py b/module/plugins/hoster/RyushareCom.py index 9bbbdcb91..9ca8dc99e 100644 --- a/module/plugins/hoster/RyushareCom.py +++ b/module/plugins/hoster/RyushareCom.py @@ -1,18 +1,44 @@ # -*- coding: utf-8 -*- from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo +import re class RyushareCom(XFileSharingPro): __name__ = "RyushareCom" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)*?ryushare.com/\w{11,}" - __version__ = "0.03" + __version__ = "0.04" __description__ = """ryushare.com hoster plugin""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") - + HOSTER_NAME = "ryushare.com" - + def setup(self): self.resumeDownload = self.multiDL = self.premium + self.chunkLimit = 3 + + def getDownloadLink(self): + self.html = self.load(self.pyfile.url) + action, inputs = self.parseHtmlForm(input_names={"op": re.compile("^download")}) + if inputs.has_key('method_premium'): + del inputs['method_premium'] + + self.html = self.load(self.pyfile.url, post = inputs) + action, inputs = self.parseHtmlForm('F1') + + for i in xrange(10): + self.logInfo('Attempt to detect direct link #%d' % i) + + # wait 60 seconds + seconds = re.search(r'Please wait <span id="[^"]+">(?P<sec>\d+)</span> seconds</span> or', self.html).group('sec') + self.setWait(seconds) + self.wait() + + self.html = self.load(self.pyfile.url, post = inputs) + if 'Click here to download' in self.html: + m = re.search(r'<a href="([^"]+)">Click here to download</a>', self.html) + return m.group(1) + + self.parseError('No direct link within 10 retries') -getInfo = create_getInfo(RyushareCom)
\ No newline at end of file +getInfo = create_getInfo(RyushareCom) |