summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar ajs124_desk <ajs@online.de> 2013-05-18 17:54:52 +0200
committerGravatar ajs124_desk <ajs@online.de> 2013-05-18 17:54:52 +0200
commit04764f8665df33c720d63e83ce0f62d7c9dde1f2 (patch)
tree85540f79885f49928138c016958071a37d9826b4 /module/plugins
parentremove unnecessary patterns (diff)
downloadpyload-04764f8665df33c720d63e83ce0f62d7c9dde1f2.tar.xz
now based on XFileSharingPro.py
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/hoster/FilezyNet.py95
1 files changed, 7 insertions, 88 deletions
diff --git a/module/plugins/hoster/FilezyNet.py b/module/plugins/hoster/FilezyNet.py
index 4fa1924e1..026850d71 100644
--- a/module/plugins/hoster/FilezyNet.py
+++ b/module/plugins/hoster/FilezyNet.py
@@ -1,101 +1,20 @@
# -*- coding: utf-8 -*-
-import re
-from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
-from module.utils import html_unescape
-from module.network.RequestFactory import getURL
+from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo
-class FilezyNet(SimpleHoster):
+class FilezyNet(XFileSharingPro):
__name__ = "FilezyNet"
__type__ = "hoster"
__version__ = "0.1"
__pattern__ = r"http://filezy.net/.*/.*.html"
__description__ = """filezy.net hoster plugin"""
- FILE_INFO_PATTERN = r'<p>Download: <span>(?P<N>[^<]+)</span> <span class="plansize">(?P<S>[^<]+)</span>'
- FILE_OFFLINE_PATTERN = r'<h2>File Not Found</h2>'
+ 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>'
def setup(self):
self.resumeDownload = True
- self.multiDL = False
-
- def handleFree(self):
- # Define search patterns
- op_pattern = '<input type="hidden" name="op" value="(.*)">'
- id_pattern = '<input type="hidden" name="id" value="(.*)">'
- fn_pattern = '<input type="hidden" name="fname" value="(.*)">'
- re_pattern = '<input type="hidden" name="referer" value="(.*)">'
- ul_pattern = '<input type="hidden" name="usr_login" value="(.*)">'
- rand_pattern = '<input type="hidden" name="rand" value="(.*)">'
- link_pattern = '<a href="(.*)" class="btn-video">Download File</a>'
-
- # Get HTML source
- self.logDebug("Getting first HTML source")
- html = self.load(self.pyfile.url)
- self.logDebug(" > Done")
-
- op_val = re.search(op_pattern, html).group(1)
- id_val = re.search(id_pattern, html).group(1)
- fn_val = re.search(fn_pattern, html).group(1)
- re_val = re.search(re_pattern, html).group(1)
- ul_val = re.search(ul_pattern, html).group(1)
-
- # Debug values
- self.logDebug(" > Op " + op_val)
- self.logDebug(" > Id " + id_val)
- self.logDebug(" > Fname " + fn_val)
- self.logDebug(" > Referer " + re_val)
- self.logDebug(" > User Login " + ul_val)
-
- # Create post data
- post_data = {"op" : op_val, "usr_login" : ul_val, "id" : id_val, "fname" : fn_val, "referer" : re_val, "method_free" : "+Free+Download"}
-
- # Post and get new HTML source
- self.logDebug("Getting second HTML source")
- html = self.load(self.pyfile.url, post = post_data, decode=True)
- self.logDebug(" > Done")
-
- # Retrieve data
- if re.search(op_pattern, html) is not None:
- op_val = re.search(op_pattern, html).group(1)
- else:
- self.retry(3, 10, "Second html: no op found!!")
-
- if re.search(id_pattern, html) is not None:
- id_val = re.search(id_pattern, html).group(1)
- else:
- self.retry(3, 10, "Second html: no id found!!")
-
- if re.search(rand_pattern, html) is not None:
- rand_val = re.search(rand_pattern, html).group(1)
- else:
- self.retry(3, 10, "Second html: no rand found!!")
-
- re_val = self.pyfile.url
-
- # Debug values
- self.logDebug(" > Op " + op_val)
- self.logDebug(" > Id " + id_val)
- self.logDebug(" > Rand " + rand_val)
- self.logDebug(" > Referer " + re_val)
-
- self.setWait(31)
- self.wait()
-
- # Create post data
- post_data = {"op" : op_val, "id" : id_val, "rand" : rand_val, "referer" : re_val, "method_free" : "+Free+Download", "method_premium" : "", "down_direct" : "1"}
-
- # Post and get new HTML source
- self.logDebug("Getting third HTML source")
- html = self.load(self.pyfile.url, post = post_data, decode=True)
- self.logDebug(" > Done")
-
- # Get link value
- if re.search(link_pattern, html) is not None:
- link_val = re.search(link_pattern, html).group(1)
- self.logDebug(" > Link " + link_val)
- self.download(link_val)
- else:
- self.logDebug("No link found!!")
- self.retry(3, 10, "No link found!!")
+ self.multiDL = self.premium
getInfo = create_getInfo(FilezyNet)