From 3c9f55270a83b0e88ec0dc516f9d9921e4d7b6ea Mon Sep 17 00:00:00 2001 From: mkaay Date: Wed, 25 Aug 2010 16:48:55 +0200 Subject: merged gui --- core/module/plugins/crypter/HoerbuchIn.py | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 core/module/plugins/crypter/HoerbuchIn.py (limited to 'core/module/plugins/crypter/HoerbuchIn.py') diff --git a/core/module/plugins/crypter/HoerbuchIn.py b/core/module/plugins/crypter/HoerbuchIn.py new file mode 100644 index 000000000..a40e5104b --- /dev/null +++ b/core/module/plugins/crypter/HoerbuchIn.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import re + +from module.plugins.Crypter import Crypter + +class HoerbuchIn(Crypter): + __name__ = "HoerbuchIn" + __type__ = "container" + __pattern__ = r"http://(www\.)?hoerbuch\.in/(blog\.php\?id=|download_(.*)\.html)" + __version__ = "0.4" + __description__ = """Hoerbuch.in Container Plugin""" + __author_name__ = ("spoob") + __author_mail__ = ("spoob@pyload.org") + + def __init__(self, parent): + Crypter.__init__(self, parent) + self.parent = parent + self.html = None + + def download_html(self): + url = self.parent.url + self.html = self.req.load(url) + + def file_exists(self): + """ returns True or False + """ + self.download_html() + if re.search(r"Download", self.html) != None: + return True + return False + + def proceed(self, url, location): + temp_links = [] + download_container = ("Download", "Mirror #1", "Mirror #2", "Mirror #3") + for container in download_container: + download_content = re.search("
" + 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('