diff options
author | Stefano <l.stickell@yahoo.it> | 2013-03-23 14:12:23 +0100 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-03-23 14:12:23 +0100 |
commit | 5852d7eddfef1713a857cf8f205545c7e1be7fb7 (patch) | |
tree | 688fb23194e467bfca054fc0ab4ad54937e29e8a /module/plugins/hoster/RyushareCom.py | |
parent | New hoster: LuckyShareNet (diff) | |
download | pyload-5852d7eddfef1713a857cf8f205545c7e1be7fb7.tar.xz |
Code cleanup
Diffstat (limited to 'module/plugins/hoster/RyushareCom.py')
-rw-r--r-- | module/plugins/hoster/RyushareCom.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/module/plugins/hoster/RyushareCom.py b/module/plugins/hoster/RyushareCom.py index 59953274f..51ec9e385 100644 --- a/module/plugins/hoster/RyushareCom.py +++ b/module/plugins/hoster/RyushareCom.py @@ -2,16 +2,12 @@ from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo import re -def to_seconds(m): - minutes = int(m['min']) if m['min'] else 0 - seconds = int(m['sec']) if m['sec'] else 0 - return minutes * 60 + seconds class RyushareCom(XFileSharingPro): __name__ = "RyushareCom" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)*?ryushare.com/\w{11,}" - __version__ = "0.08" + __version__ = "0.09" __description__ = """ryushare.com hoster plugin""" __author_name__ = ("zoidberg", "stickell") __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") @@ -42,8 +38,9 @@ class RyushareCom(XFileSharingPro): if 'You have reached the download-limit!!!' in self.html: self.setWait(3600, True) else: - m = re.search(self.WAIT_PATTERN, self.html) - self.setWait(to_seconds(m.groupdict())) + m = re.search(self.WAIT_PATTERN, self.html).groupdict('0') + waittime = int(m['m']) * 60 + int(m['s']) + self.setWait(waittime) self.wait() self.html = self.load(self.pyfile.url, post = inputs) |