diff options
| author | 2014-09-28 16:30:24 +0200 | |
|---|---|---|
| committer | 2014-09-28 16:30:24 +0200 | |
| commit | 3177003f188d8f48ecafe5483e69f8b838581628 (patch) | |
| tree | d2ea11252b3ea1f844c16aff7fbe54e54738df6c /module | |
| parent | Prepare method improves setup one (diff) | |
| download | pyload-3177003f188d8f48ecafe5483e69f8b838581628.tar.xz | |
[DeadHoster] Improve getInfo + two hosters mark dead
Diffstat (limited to 'module')
| -rw-r--r-- | module/plugins/hoster/FilezyNet.py | 32 | ||||
| -rw-r--r-- | module/plugins/hoster/IFileWs.py | 13 | ||||
| -rw-r--r-- | module/plugins/internal/DeadHoster.py | 2 | 
3 files changed, 9 insertions, 38 deletions
diff --git a/module/plugins/hoster/FilezyNet.py b/module/plugins/hoster/FilezyNet.py index 969007a8a..1831465d3 100644 --- a/module/plugins/hoster/FilezyNet.py +++ b/module/plugins/hoster/FilezyNet.py @@ -1,42 +1,18 @@  # -*- coding: utf-8 -*- -import re +from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo -from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo - -class FilezyNet(XFileSharingPro): +class FilezyNet(DeadHoster):      __name__ = "FilezyNet"      __type__ = "hoster" -    __version__ = "0.1" +    __version__ = "0.2" -    __pattern__ = r'http://(?:www\.)?filezy.net/.*/.*.html' +    __pattern__ = r'http://(?:www\.)?filezy\.net/\w{12}'      __description__ = """Filezy.net hoster plugin"""      __author_name__ = None      __author_mail__ = None -    HOSTER_NAME = "filezy.net" - -    FILE_SIZE_PATTERN = r'<span class="plansize">(?P<S>[0-9.]+) (?P<U>[kKMG])i?B</span>' -    WAIT_PATTERN = r'<div id="countdown_str" class="seconds">\n<!--Wait--> <span id=".*?">(\d+)</span>' -    DOWNLOAD_JS_PATTERN = r"<script type='text/javascript'>eval(.*)" - - -    def setup(self): -        self.resumeDownload = True -        self.multiDL = self.premium - -    def getDownloadLink(self): -        self.logDebug("Getting download link") - -        data = self.getPostParameters() -        self.html = self.load(self.pyfile.url, post=data, ref=True, decode=True) - -        obfuscated_js = re.search(self.DOWNLOAD_JS_PATTERN, self.html) -        dl_file_now = self.js.eval(obfuscated_js.group(1)) -        link = re.search(self.LINK_PATTERN, dl_file_now) -        return link.group(1) -  getInfo = create_getInfo(FilezyNet) diff --git a/module/plugins/hoster/IFileWs.py b/module/plugins/hoster/IFileWs.py index 94d3e599e..4400449b6 100644 --- a/module/plugins/hoster/IFileWs.py +++ b/module/plugins/hoster/IFileWs.py @@ -1,23 +1,18 @@  # -*- coding: utf-8 -*- -from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo -class IFileWs(XFileSharingPro): +class IFileWs(DeadHoster):      __name__ = "IFileWs"      __type__ = "hoster" -    __version__ = "0.01" +    __version__ = "0.02" -    __pattern__ = r'http://(?:www\.)?ifile\.ws/\w+(/.+)?' +    __pattern__ = r'http://(?:www\.)?ifile\.ws/\w{12}'      __description__ = """Ifile.ws hoster plugin"""      __author_name__ = "z00nx"      __author_mail__ = "z00nx0@gmail.com" -    HOSTER_NAME = "ifile.ws" - -    FILE_INFO_PATTERN = r'<h1\s+style="display:inline;">(?P<N>[^<]+)</h1>\s+\[(?P<S>[^]]+)\]' -    OFFLINE_PATTERN = r'File Not Found|The file was removed by administrator' -  getInfo = create_getInfo(IFileWs) diff --git a/module/plugins/internal/DeadHoster.py b/module/plugins/internal/DeadHoster.py index 3fa5190d7..37cd3cf17 100644 --- a/module/plugins/internal/DeadHoster.py +++ b/module/plugins/internal/DeadHoster.py @@ -6,7 +6,7 @@ from module.plugins.Hoster import Hoster as _Hoster  def create_getInfo(plugin):      def getInfo(urls): -        yield [('#N/A: ' + url, 0, 1, url) for url in urls] +        yield map(lambda url: ('#N/A: ' + url, 0, 1, url), urls)      return getInfo  | 
