From 27ebe0ad2b25d816ffd1fdb8135da19fcc1b0db3 Mon Sep 17 00:00:00 2001 From: ajs124_desk Date: Wed, 8 May 2013 17:09:01 +0200 Subject: FilezyNet: hoster added --- module/plugins/hoster/FilezyNet.py | 103 +++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 module/plugins/hoster/FilezyNet.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FilezyNet.py b/module/plugins/hoster/FilezyNet.py new file mode 100644 index 000000000..ee09b91f4 --- /dev/null +++ b/module/plugins/hoster/FilezyNet.py @@ -0,0 +1,103 @@ +# -*- 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 + +class FilezyNet(SimpleHoster): + __name__ = "FilezyNet" + __type__ = "hoster" + __version__ = "0.1" + __pattern__ = r"http://filezy.net/.*/.*.html" + __description__ = """filezy.net hoster plugin""" + + FILE_NAME_PATTERN = r'' + FILE_SIZE_PATTERN = r'(?P[0-9.]+) (?P[kKMG])i?B' + FILE_INFO_PATTERN = r'

Download: (?P[^<]+) (?P[^<]+)' + FILE_OFFLINE_PATTERN = r'

File Not Found

' + + def setup(self): + self.resumeDownload = True + self.multiDL = False + + def handleFree(self): + # Define search patterns + op_pattern = '' + id_pattern = '' + fn_pattern = '' + re_pattern = '' + ul_pattern = '' + rand_pattern = '' + link_pattern = 'Download File' + + # 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!!") + +getInfo = create_getInfo(FilezyNet) -- cgit v1.2.3 From 738f7660920e7a4c6aecc2c830ceb204dc3750f0 Mon Sep 17 00:00:00 2001 From: ajs124_desk Date: Wed, 8 May 2013 20:11:08 +0200 Subject: remove unnecessary patterns --- module/plugins/hoster/FilezyNet.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FilezyNet.py b/module/plugins/hoster/FilezyNet.py index ee09b91f4..4fa1924e1 100644 --- a/module/plugins/hoster/FilezyNet.py +++ b/module/plugins/hoster/FilezyNet.py @@ -11,8 +11,6 @@ class FilezyNet(SimpleHoster): __pattern__ = r"http://filezy.net/.*/.*.html" __description__ = """filezy.net hoster plugin""" - FILE_NAME_PATTERN = r'' - FILE_SIZE_PATTERN = r'(?P[0-9.]+) (?P[kKMG])i?B' FILE_INFO_PATTERN = r'

Download: (?P[^<]+) (?P[^<]+)' FILE_OFFLINE_PATTERN = r'

File Not Found

' -- cgit v1.2.3 From 04764f8665df33c720d63e83ce0f62d7c9dde1f2 Mon Sep 17 00:00:00 2001 From: ajs124_desk Date: Sat, 18 May 2013 17:54:52 +0200 Subject: now based on XFileSharingPro.py --- module/plugins/hoster/FilezyNet.py | 95 +++----------------------------------- 1 file changed, 7 insertions(+), 88 deletions(-) (limited to 'module/plugins/hoster') 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'

Download: (?P[^<]+) (?P[^<]+)' - FILE_OFFLINE_PATTERN = r'

File Not Found

' + HOSTER_NAME = "filezy.net" + + FILE_SIZE_PATTERN = r'(?P[0-9.]+) (?P[kKMG])i?B' + WAIT_PATTERN = r'
\n (\d+)' def setup(self): self.resumeDownload = True - self.multiDL = False - - def handleFree(self): - # Define search patterns - op_pattern = '' - id_pattern = '' - fn_pattern = '' - re_pattern = '' - ul_pattern = '' - rand_pattern = '' - link_pattern = 'Download File' - - # 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) -- cgit v1.2.3 From 10da5243a284e220c8d6fcbafe7d3004ab3255c9 Mon Sep 17 00:00:00 2001 From: ajs124_desk Date: Sun, 26 May 2013 02:48:38 +0200 Subject: working again. javascript, yay. --- module/plugins/hoster/FilezyNet.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'module/plugins/hoster') 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'(?P[0-9.]+) (?P[kKMG])i?B' WAIT_PATTERN = r'
\n (\d+)' + DOWNLOAD_JS_PATTERN = r"