From 5852d7eddfef1713a857cf8f205545c7e1be7fb7 Mon Sep 17 00:00:00 2001 From: Stefano Date: Sat, 23 Mar 2013 14:12:23 +0100 Subject: Code cleanup --- module/plugins/hoster/EgoFilesCom.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'module/plugins/hoster/EgoFilesCom.py') diff --git a/module/plugins/hoster/EgoFilesCom.py b/module/plugins/hoster/EgoFilesCom.py index 6b8fbd8f0..211f990ab 100644 --- a/module/plugins/hoster/EgoFilesCom.py +++ b/module/plugins/hoster/EgoFilesCom.py @@ -4,16 +4,12 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo from module.plugins.ReCaptcha import ReCaptcha import re -def to_seconds(m): - minutes = int(m['m']) if m['m'] else 0 - seconds = int(m['s']) if m['s'] else 0 - return minutes * 60 + seconds class EgoFilesCom(SimpleHoster): __name__ = "EgoFilesCom" __type__ = "hoster" __pattern__ = r"https?://(www\.)?egofiles.com/(\w+)" - __version__ = "0.08" + __version__ = "0.09" __description__ = """Egofiles.com Download Hoster""" __author_name__ = ("stickell") __author_mail__ = ("l.stickell@yahoo.it") @@ -40,8 +36,9 @@ class EgoFilesCom(SimpleHoster): # Wait time between free downloads if 'For next free download you have to wait' in self.html: - m = re.search(self.WAIT_TIME_PATTERN, self.html) - self.setWait(to_seconds(m.groupdict()), True) + m = re.search(self.WAIT_TIME_PATTERN, self.html).groupdict('0') + waittime = int(m['m']) * 60 + int(m['s']) + self.setWait(waittime, True) self.wait() downloadURL = '' -- cgit v1.2.3