diff options
author | Stefano <l.stickell@yahoo.it> | 2013-05-30 14:56:15 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-05-30 14:56:15 +0200 |
commit | e2c9a30003f71e892bb8f06e7b954ea192765982 (patch) | |
tree | 395d81a74a78494744ce8b1dc30cbb79291e6365 /module/plugins/hoster/FilezyNet.py | |
parent | UploadheroCom: test link (diff) | |
parent | convert intendation from two to four spaces (diff) | |
download | pyload-e2c9a30003f71e892bb8f06e7b954ea192765982.tar.xz |
Merge pull request #107 from ajs124/stable
FilezyNet: hoster added
Diffstat (limited to 'module/plugins/hoster/FilezyNet.py')
-rw-r--r-- | module/plugins/hoster/FilezyNet.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/module/plugins/hoster/FilezyNet.py b/module/plugins/hoster/FilezyNet.py new file mode 100644 index 000000000..7c5729c2d --- /dev/null +++ b/module/plugins/hoster/FilezyNet.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +import re +from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo + +class FilezyNet(XFileSharingPro): + __name__ = "FilezyNet" + __type__ = "hoster" + __version__ = "0.1" + __pattern__ = r"http://filezy.net/.*/.*.html" + __description__ = """filezy.net hoster plugin""" + + 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.DIRECT_LINK_PATTERN, dl_file_now) + return link.group(1) + +getInfo = create_getInfo(FilezyNet) |