summaryrefslogtreecommitdiffstats
path: root/Plugins/HoerbuchIn.py
diff options
context:
space:
mode:
Diffstat (limited to 'Plugins/HoerbuchIn.py')
-rw-r--r--Plugins/HoerbuchIn.py15
1 files changed, 10 insertions, 5 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: