From 282362c01b67f83ff5cf677ba125a41a6d594f2c Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 15 Nov 2014 17:15:29 +0100 Subject: Update plugins 2 --- pyload/plugins/crypter/FreakhareCom.py | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 pyload/plugins/crypter/FreakhareCom.py (limited to 'pyload/plugins/crypter/FreakhareCom.py') diff --git a/pyload/plugins/crypter/FreakhareCom.py b/pyload/plugins/crypter/FreakhareCom.py new file mode 100644 index 000000000..792badeb4 --- /dev/null +++ b/pyload/plugins/crypter/FreakhareCom.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- + +import re + +from pyload.plugins.internal.SimpleCrypter import SimpleCrypter + + +class FreakhareCom(SimpleCrypter): + __name__ = "FreakhareCom" + __type__ = "crypter" + __version__ = "0.03" + + __pattern__ = r'http://(?:www\.)?freakshare\.com/folder/.+' + __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), + ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + + __description__ = """Freakhare.com folder decrypter plugin""" + __license__ = "GPLv3" + __authors__ = [("stickell", "l.stickell@yahoo.it")] + + + LINK_PATTERN = r'' + NAME_PATTERN = r'Folder: (?P.+)' + PAGES_PATTERN = r'Pages: +(\d+)' + + + def loadPage(self, page_n): + if not hasattr(self, 'f_id') and not hasattr(self, 'f_md5'): + m = re.search(r'http://freakshare.com/\?x=folder&f_id=(\d+)&f_md5=(\w+)', self.html) + if m: + self.f_id = m.group(1) + self.f_md5 = m.group(2) + return self.load('http://freakshare.com/', get={'x': 'folder', + 'f_id': self.f_id, + 'f_md5': self.f_md5, + 'entrys': '20', + 'page': page_n - 1, + 'order': ''}, decode=True) -- cgit v1.2.3