From 300f9e4333d87382e46791e1d6473b91f62f7e1d Mon Sep 17 00:00:00 2001 From: ajs124_desk Date: Sun, 26 May 2013 16:28:05 +0200 Subject: remove useless header stuff. try to increase readability --- module/plugins/hoster/FilezyNet.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hoster/FilezyNet.py b/module/plugins/hoster/FilezyNet.py index 57619c38c..76e16d3ad 100644 --- a/module/plugins/hoster/FilezyNet.py +++ b/module/plugins/hoster/FilezyNet.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- import re from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo -from pycurl import FOLLOWLOCATION class FilezyNet(XFileSharingPro): __name__ = "FilezyNet" @@ -24,11 +23,11 @@ class FilezyNet(XFileSharingPro): 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) + 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) -- cgit v1.2.3