diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-07-07 18:40:48 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-07-07 18:40:48 +0200 |
commit | 9473df4c5b8708da5936fa23c26957da092f4228 (patch) | |
tree | a84f863b2899e3b8ffdcb1204a424bef9b5da046 /module/plugins/hoster | |
parent | [UpdateManager] Fixed broken updating for new plugin + sort updates + better ... (diff) | |
download | pyload-9473df4c5b8708da5936fa23c26957da092f4228.tar.xz |
[FiredriveCom] Fixed download link recognition + added TEMP_OFFLINE_PATTERN
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/FiredriveCom.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/module/plugins/hoster/FiredriveCom.py b/module/plugins/hoster/FiredriveCom.py index 5c6b4ea0c..e7bd49674 100644 --- a/module/plugins/hoster/FiredriveCom.py +++ b/module/plugins/hoster/FiredriveCom.py @@ -23,7 +23,7 @@ class FiredriveCom(SimpleHoster): __name__ = "FiredriveCom" __type__ = "hoster" __pattern__ = r'https?://(?:www\.)?(firedrive|putlocker)\.com/(mobile/)?(file|embed)/(?P<ID>\w+)' - __version__ = "0.01" + __version__ = "0.02" __description__ = """Firedrive.com hoster plugin""" __author_name__ = "Walter Purcaro" __author_mail__ = "vuolter@gmail.com" @@ -31,6 +31,7 @@ class FiredriveCom(SimpleHoster): FILE_NAME_PATTERN = r'<b>Name:</b> (?P<N>.+) <br>' FILE_SIZE_PATTERN = r'<b>Size:</b> (?P<S>[\d.]+) (?P<U>[a-zA-Z]+) <br>' OFFLINE_PATTERN = r'class="sad_face_image"' + TEMP_OFFLINE_PATTERN = r'>(File Temporarily Unavailable|Server Error. Try again later)' FILE_URL_REPLACEMENTS = [(__pattern__, r'http://www.firedrive.com/file/\g<ID>')] @@ -44,8 +45,12 @@ class FiredriveCom(SimpleHoster): self.download(link, disposition=True) def _getLink(self): - self.html = self.load(self.pyfile.url, post={"confirm": re.search(r'name="confirm" value="(.*)"', self.html).group(1)}) - return re.search(r'<a href="(https?://dl\.firedrive\.com/.*?)"', self.html).group(1) + f = re.search(r'<a href="(https?://dl\.firedrive\.com/\?key=.+?)"', self.html) + if f: + return f.group(1) + else: + self.html = self.load(self.pyfile.url, post={"confirm": re.search(r'name="confirm" value="(.+?)"', self.html).group(1)}) + return self._getLink() getInfo = create_getInfo(FiredriveCom) |