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 ++++++++++----- Plugins/Plugin.py | 4 +++- Plugins/RapidshareCom.py | 14 +++++++------- config | 2 +- 4 files changed, 21 insertions(+), 14 deletions(-) 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: diff --git a/Plugins/Plugin.py b/Plugins/Plugin.py index 0ff11ecb5..945d8ec76 100644 --- a/Plugins/Plugin.py +++ b/Plugins/Plugin.py @@ -54,7 +54,9 @@ class Plugin(): pyfile.status.exists = self.file_exists() if not pyfile.status.exists: - raise Exception, "The file was not found on the server." + #raise Exception, "The file was not found on the server." + self.logger.info("The file was not found on the server.") + return False pyfile.status.filename = self.get_file_name() diff --git a/Plugins/RapidshareCom.py b/Plugins/RapidshareCom.py index 2c78a2672..a81affd90 100644 --- a/Plugins/RapidshareCom.py +++ b/Plugins/RapidshareCom.py @@ -14,10 +14,10 @@ class RapidshareCom(Plugin): props['name'] = "RapidshareCom" props['type'] = "hoster" props['pattern'] = r"http://(?:www.)?(rs\d*.)?rapidshare.com/files/" - props['version'] = "0.1" + props['version'] = "0.4" props['description'] = """Rapidshare.com Download Plugin""" - props['author_name'] = ("spoob") - props['author_mail'] = ("spoob@pyload.org") + props['author_name'] = ("spoob", "RaNaN") + props['author_mail'] = ("spoob@pyload.org", "ranan@pyload.org") self.props = props self.parent = parent self.html = [None, None] @@ -109,11 +109,11 @@ class RapidshareCom(Plugin): def file_exists(self): """ returns True or False """ - if re.search(r".*The File could not be found.*", self.html[0]) != None or \ + if re.search(r"The File could not be found", self.html[0]) != None or \ re.search(r"(

This limit is reached.

)", self.html[0]) or \ - re.search(r"(.*is momentarily not available.*)", self.html[0]) or \ - re.search(r"(.*The uploader has removed this file from the server.*)", self.html[0]) or \ - re.search(r"(.*This file is suspected to contain illegal content.*)", self.html[0]): + re.search(r"(is momentarily not available)", self.html[0]) or \ + re.search(r"(The uploader has removed this file from the server)", self.html[0]) or \ + re.search(r"(This file is suspected to contain illegal content)", self.html[0]): return False else: return True diff --git a/config b/config index 246d63d8f..d5ec33490 100644 --- a/config +++ b/config @@ -3,7 +3,7 @@ port = 7272 password = pwhere [webinterface] -activated = True +activated = False port = 8080 username = User password = webpw -- cgit v1.2.3