From 81508f295cffc40c479fe72f24bdf1dbbedf5d92 Mon Sep 17 00:00:00 2001 From: mkaay Date: Wed, 5 May 2010 23:03:43 +0200 Subject: refactored plugins, new plugin manager --- module/plugins/crypter/DDLMusicOrg.py | 56 +++++ module/plugins/crypter/FourChanOrg.py | 39 ++++ module/plugins/crypter/HoerbuchIn.py | 46 ++++ module/plugins/crypter/LixIn.py | 34 +++ module/plugins/crypter/OneKhDe.py | 36 ++++ module/plugins/crypter/RSLayerCom.py | 37 ++++ module/plugins/crypter/RelinkUs.py | 58 +++++ module/plugins/crypter/SecuredIn.py | 334 +++++++++++++++++++++++++++++ module/plugins/crypter/SerienjunkiesOrg.py | 217 +++++++++++++++++++ module/plugins/crypter/StealthTo.py | 45 ++++ module/plugins/crypter/YoutubeChannel.py | 52 +++++ module/plugins/crypter/__init__.py | 0 12 files changed, 954 insertions(+) create mode 100644 module/plugins/crypter/DDLMusicOrg.py create mode 100644 module/plugins/crypter/FourChanOrg.py create mode 100644 module/plugins/crypter/HoerbuchIn.py create mode 100644 module/plugins/crypter/LixIn.py create mode 100644 module/plugins/crypter/OneKhDe.py create mode 100644 module/plugins/crypter/RSLayerCom.py create mode 100644 module/plugins/crypter/RelinkUs.py create mode 100644 module/plugins/crypter/SecuredIn.py create mode 100644 module/plugins/crypter/SerienjunkiesOrg.py create mode 100644 module/plugins/crypter/StealthTo.py create mode 100644 module/plugins/crypter/YoutubeChannel.py create mode 100644 module/plugins/crypter/__init__.py (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/DDLMusicOrg.py b/module/plugins/crypter/DDLMusicOrg.py new file mode 100644 index 000000000..1c5632cda --- /dev/null +++ b/module/plugins/crypter/DDLMusicOrg.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import re +from time import sleep + +from module.plugins.Crypter import Crypter + +class DDLMusicOrg(Crypter): + __name__ = "DDLMusicOrg" + __type__ = "container" + __pattern__ = r"http://[\w\.]*?ddl-music\.org/captcha/ddlm_cr\d\.php\?\d+\?\d+" + __version__ = "0.1" + __description__ = """ddl-music.org Container Plugin""" + __author_name__ = ("mkaay") + __author_mail__ = ("mkaay@mkaay.de") + + def __init__(self, parent): + Crypter.__init__(self, parent) + self.parent = parent + self.html = None + self.multi_dl = False + + def download_html(self): + url = self.parent.url + self.html = self.req.load(url, cookies=True) + + def file_exists(self): + """ returns True or False + """ + if not self.html: + self.download_html() + if re.search(r"Wer dies nicht rechnen kann", self.html) != None: + return True + return False + + def proceed(self, url, location): + for i in range(5): + self.download_html() + posturl = re.search(r"id=\"captcha\" action=\"(/captcha/ddlm_cr\d\.php)\"", self.html).group(1) + math = re.search(r"(\d+) ([\+-]) (\d+) =\s+", htmlwithlink) + if m: + self.links = [m.group(1)] + return + self.links = False diff --git a/module/plugins/crypter/FourChanOrg.py b/module/plugins/crypter/FourChanOrg.py new file mode 100644 index 000000000..cbcdd920c --- /dev/null +++ b/module/plugins/crypter/FourChanOrg.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import re + +from module.plugins.Crypter import Crypter + +class FourChanOrg(Crypter): + __name__ = "FourChanOrg" + __type__ = "container" + __pattern__ = r"http://(www\.)?(img\.)?(zip\.)?4chan.org/\w+/(res/|imgboard\.html)" + __version__ = "0.1" + __description__ = """4chan.org Thread Download Plugin""" + __author_name__ = ("Spoob") + __author_mail__ = ("Spoob@pyload.org") + + def __init__(self, parent): + Crypter.__init__(self, parent) + self.parent = parent + self.html = None + + def file_exists(self): + """ returns True or False + """ + return True + + def proceed(self, url, location): + url = self.parent.url + html = self.req.load(url) + link_pattern = "" + temp_links = [] + if "imagebord.html" in url: + link_pattern = '[Reply]' + temp_links = re.findall(link_pattern, html) + for link in re.findall(link_pattern, html): + temp_links.append(link) + else: + temp_links = re.findall('File : " + container + ":(.*?)
", self.html).group(1) + tmp = re.findall('
Part \d+', download_content) + if tmp == []: continue + for link in tmp: + link_html = self.req.load(link, cookies=True) + temp_links.append(re.search('