From cac85c230764ac665485bbe4c8416a2c200e2ac0 Mon Sep 17 00:00:00 2001 From: spoob Date: Mon, 24 Aug 2009 15:45:16 +0200 Subject: Updated Hoerbuch.in --- Plugins/HoerbuchIn.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'Plugins/HoerbuchIn.py') diff --git a/Plugins/HoerbuchIn.py b/Plugins/HoerbuchIn.py index 4dd01dac3..02d3a79e7 100644 --- a/Plugins/HoerbuchIn.py +++ b/Plugins/HoerbuchIn.py @@ -13,7 +13,7 @@ class HoerbuchIn(Plugin): props['name'] = "HoerbuchIn" props['type'] = "container" props['pattern'] = r"http://(www\.)?hoerbuch\.in/blog\.php\?id=" - props['version'] = "0.1" + props['version'] = "0.3" props['description'] = """Hoerbuch.in Container Plugin""" props['author_name'] = ("spoob") props['author_mail'] = ("spoob@pyload.org") @@ -21,18 +21,23 @@ class HoerbuchIn(Plugin): 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 """ - return True + self.download_html() + if re.search(r"Download", self.html) != None: + return True + return False def proceed(self, url, location): - url = self.parent.url - html = self.req.load(url) temp_links = [] download_container = ("Download", "Mirror #1", "Mirror #2", "Mirror #3") for container in download_container: - download_content = re.search("
" + container + ":(.*?)
", html).group(1) + download_content = re.search("
" + container + ":(.*?)
", self.html).group(1) tmp = re.findall('Part \d+', download_content) if tmp == []: continue for link in tmp: -- cgit v1.2.3