From e2f5f2d01848f2bb2ae5dd2460dc34401e3a4aeb Mon Sep 17 00:00:00 2001 From: Stefano Date: Tue, 12 Mar 2013 21:27:54 +0100 Subject: EgoFilesCom: minor changes --- module/plugins/hoster/EgoFilesCom.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/module/plugins/hoster/EgoFilesCom.py b/module/plugins/hoster/EgoFilesCom.py index 32feecee2..340bd47de 100644 --- a/module/plugins/hoster/EgoFilesCom.py +++ b/module/plugins/hoster/EgoFilesCom.py @@ -13,7 +13,7 @@ class EgoFilesCom(SimpleHoster): __name__ = "EgoFilesCom" __type__ = "hoster" __pattern__ = r"https?://(www\.)?egofiles.com/(\w+)" - __version__ = "0.05" + __version__ = "0.06" __description__ = """Egofiles.com Download Hoster""" __author_name__ = ("stickell") __author_mail__ = ("l.stickell@yahoo.it") @@ -21,6 +21,7 @@ class EgoFilesCom(SimpleHoster): FILE_INFO_PATTERN = r'
\s+(?P\S+)\s+
\s+(File size|Rozmiar): (?P[\w.]+) (?P\w+) \|' FILE_OFFLINE_PATTERN = r'File size: 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' def init(self): @@ -50,9 +51,9 @@ class EgoFilesCom(SimpleHoster): post_data = {'recaptcha_challenge_field': challenge, 'recaptcha_response_field': response} self.html = self.load(self.pyfile.url, post=post_data, decode=True) - m = re.search(r'Download >', self.html) + m = re.search(self.DIRECT_LINK_PATTERN, self.html) if not m: - self.logError('Wrong captcha') + self.logInfo('Wrong captcha') self.invalidCaptcha() elif hasattr(m, 'group'): downloadURL = m.group('link') @@ -68,7 +69,7 @@ class EgoFilesCom(SimpleHoster): def handlePremium(self): self.html = self.load(self.pyfile.url, decode=True) - m = re.search(r'Download >', self.html) + m = re.search(self.DIRECT_LINK_PATTERN, self.html) if not m: self.fail('Unable to detect direct download url - Plugin may be out of date') else: -- cgit v1.2.3