diff options
author | ajs124_desk <ajs@online.de> | 2013-05-26 02:48:38 +0200 |
---|---|---|
committer | ajs124_desk <ajs@online.de> | 2013-05-26 02:48:38 +0200 |
commit | 10da5243a284e220c8d6fcbafe7d3004ab3255c9 (patch) | |
tree | fe0567ed408cd9acd4ea218393e4aa9e18aebd2e /module/plugins | |
parent | now based on XFileSharingPro.py (diff) | |
download | pyload-10da5243a284e220c8d6fcbafe7d3004ab3255c9.tar.xz |
working again. javascript, yay.
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/hoster/FilezyNet.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/module/plugins/hoster/FilezyNet.py b/module/plugins/hoster/FilezyNet.py index 026850d71..57619c38c 100644 --- a/module/plugins/hoster/FilezyNet.py +++ b/module/plugins/hoster/FilezyNet.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- +import re from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo +from pycurl import FOLLOWLOCATION class FilezyNet(XFileSharingPro): __name__ = "FilezyNet" @@ -12,9 +14,21 @@ class FilezyNet(XFileSharingPro): 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.req.http.c.setopt(FOLLOWLOCATION, 0) + self.html = self.load(self.pyfile.url, post = data, ref = True, decode = True) + self.header = self.req.http.header + self.req.http.c.setopt(FOLLOWLOCATION, 1) + + return re.search(self.DIRECT_LINK_PATTERN, self.js.eval(re.search(self.DOWNLOAD_JS_PATTERN, self.html).group(1))).group(1) + getInfo = create_getInfo(FilezyNet) |