From 480b688d4490c9087a30af92a8c3400bce9341b3 Mon Sep 17 00:00:00 2001 From: Stefano Date: Wed, 20 Mar 2013 20:31:45 +0100 Subject: EgoFilesCom: better file offline pattern. http://forum.pyload.org/viewtopic.php?p=8359#p8359 --- module/plugins/hoster/EgoFilesCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/EgoFilesCom.py') diff --git a/module/plugins/hoster/EgoFilesCom.py b/module/plugins/hoster/EgoFilesCom.py index 24e26c7f5..6b8fbd8f0 100644 --- a/module/plugins/hoster/EgoFilesCom.py +++ b/module/plugins/hoster/EgoFilesCom.py @@ -13,13 +13,13 @@ class EgoFilesCom(SimpleHoster): __name__ = "EgoFilesCom" __type__ = "hoster" __pattern__ = r"https?://(www\.)?egofiles.com/(\w+)" - __version__ = "0.07" + __version__ = "0.08" __description__ = """Egofiles.com Download Hoster""" __author_name__ = ("stickell") __author_mail__ = ("l.stickell@yahoo.it") FILE_INFO_PATTERN = r'
\s+(?P\S+)\s+
\s+(File size|Rozmiar): (?P[\w.]+) (?P\w+) \|' - FILE_OFFLINE_PATTERN = r'File size: 0 KB' + FILE_OFFLINE_PATTERN = r'(File size|Rozmiar): 0 KB' WAIT_TIME_PATTERN = r'For next free download you have to wait ((?P\d*)m)? ?((?P\d+)s)?' DIRECT_LINK_PATTERN = r'Download >' RECAPTCHA_KEY = '6LeXatQSAAAAAHezcjXyWAni-4t302TeYe7_gfvX' -- cgit v1.2.3 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 From d55a25fe53a5e6d58845735c389951fa57d45674 Mon Sep 17 00:00:00 2001 From: Stefano Date: Sat, 23 Mar 2013 16:33:41 +0100 Subject: EgoFilesCom: File Info are now retrieved --- module/plugins/hoster/EgoFilesCom.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'module/plugins/hoster/EgoFilesCom.py') diff --git a/module/plugins/hoster/EgoFilesCom.py b/module/plugins/hoster/EgoFilesCom.py index 211f990ab..b27abb416 100644 --- a/module/plugins/hoster/EgoFilesCom.py +++ b/module/plugins/hoster/EgoFilesCom.py @@ -9,7 +9,7 @@ class EgoFilesCom(SimpleHoster): __name__ = "EgoFilesCom" __type__ = "hoster" __pattern__ = r"https?://(www\.)?egofiles.com/(\w+)" - __version__ = "0.09" + __version__ = "0.10" __description__ = """Egofiles.com Download Hoster""" __author_name__ = ("stickell") __author_mail__ = ("l.stickell@yahoo.it") @@ -25,12 +25,6 @@ class EgoFilesCom(SimpleHoster): # Set English language self.load("https://egofiles.com/ajax/lang.php?lang=en", just_header=True) - def process(self, pyfile): - if self.premium: - self.handlePremium() - else: - self.handleFree() - def handleFree(self): self.html = self.load(self.pyfile.url, decode=True) -- cgit v1.2.3