diff options
author | spoob <spoob@gmx.de> | 2009-08-24 15:45:16 +0200 |
---|---|---|
committer | spoob <spoob@gmx.de> | 2009-08-24 15:45:16 +0200 |
commit | cac85c230764ac665485bbe4c8416a2c200e2ac0 (patch) | |
tree | b60bbc86ec1a8f35d1c99a5fe7ec1f6edd1c2081 /Plugins | |
parent | Fixed Hoerbuch.in Plugin (diff) | |
download | pyload-cac85c230764ac665485bbe4c8416a2c200e2ac0.tar.xz |
Updated Hoerbuch.in
Diffstat (limited to 'Plugins')
-rw-r--r-- | Plugins/HoerbuchIn.py | 15 | ||||
-rw-r--r-- | Plugins/Plugin.py | 4 | ||||
-rw-r--r-- | Plugins/RapidshareCom.py | 14 |
3 files changed, 20 insertions, 13 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("<BR><B>" + container + ":</B>(.*?)<BR><B>", html).group(1) + download_content = re.search("<BR><B>" + container + ":</B>(.*?)<BR><B>", self.html).group(1) tmp = re.findall('<A HREF="http://www.hoerbuch.in/cj/out.php\?pct=\d+&url=(http://rs\.hoerbuch\.in/.+?)" TARGET="_blank">Part \d+</A>', 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"(<p>This limit is reached.</p>)", 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 |