From 97f1a5ddabdb168fcacd36cfca2ca9f89c8d5bb0 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 10 Jan 2014 00:12:55 +0100 Subject: Hoster: ExtabitCom: Fix offline pattern + code cosmetics --- module/plugins/hoster/ExtabitCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/ExtabitCom.py b/module/plugins/hoster/ExtabitCom.py index f68627b56..0678185ed 100644 --- a/module/plugins/hoster/ExtabitCom.py +++ b/module/plugins/hoster/ExtabitCom.py @@ -26,14 +26,14 @@ from module.common.json_layer import json_loads class ExtabitCom(SimpleHoster): __name__ = "ExtabitCom" __type__ = "hoster" - __pattern__ = r"http://(\w+\.)*extabit\.com/(file|go|fid)/(?P\w+)" - __version__ = "0.4" + __pattern__ = r"http://(?:www\.)?extabit\.com/(file|go|fid)/(?P\w+)" + __version__ = "0.5" __description__ = """Extabit.com""" __author_name__ = ("zoidberg") FILE_NAME_PATTERN = r'File:\s*\s*
' FILE_SIZE_PATTERN = r'Size:\s*(?P[^<]+)' - FILE_OFFLINE_PATTERN = r'

File not found

' + FILE_OFFLINE_PATTERN = r'>File not found<' TEMP_OFFLINE_PATTERN = r">(File is temporary unavailable|No download mirror)<" DOWNLOAD_LINK_PATTERN = r'[\'"](http://guest\d+\.extabit\.com/[a-z0-9]+/.*?)[\'"]' @@ -59,7 +59,7 @@ class ExtabitCom(SimpleHoster): recaptcha = ReCaptcha(self) captcha_key = m.group(1) - for i in range(5): + for _ in xrange(5): get_data = {"type": "recaptcha"} get_data["challenge"], get_data["capture"] = recaptcha.challenge(captcha_key) response = json_loads(self.load("http://extabit.com/file/%s/" % fileID, get=get_data)) -- cgit v1.2.3