summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2014-01-10 10:49:48 +0100
committerGravatar Stefano <l.stickell@yahoo.it> 2014-01-10 10:49:48 +0100
commit5ea5b63c925df5816e4ca1429746ea8c86dda1bd (patch)
tree94731a83b7297f09cdb3f592b84fc6982accf370 /module/plugins
parentFilefactory: added offline pattern (diff)
parentHoster: ExtabitCom: Fix offline pattern + code cosmetics (diff)
downloadpyload-5ea5b63c925df5816e4ca1429746ea8c86dda1bd.tar.xz
Merge pull request #470 from vuolter/s/hoster/ExtabitCom
ExtabitCom: Fix offline pattern + code cosmetics Fixes #467
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/hoster/ExtabitCom.py8
1 files changed, 4 insertions, 4 deletions
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<ID>\w+)"
- __version__ = "0.4"
+ __pattern__ = r"http://(?:www\.)?extabit\.com/(file|go|fid)/(?P<ID>\w+)"
+ __version__ = "0.5"
__description__ = """Extabit.com"""
__author_name__ = ("zoidberg")
FILE_NAME_PATTERN = r'<th>File:</th>\s*<td class="col-fileinfo">\s*<div title="(?P<N>[^"]+)">'
FILE_SIZE_PATTERN = r'<th>Size:</th>\s*<td class="col-fileinfo">(?P<S>[^<]+)</td>'
- FILE_OFFLINE_PATTERN = r'<h1>File not found</h1>'
+ 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))