From 361b11aeac893136fea1ce19b32c1579dca5e6a4 Mon Sep 17 00:00:00 2001 From: spoob Date: Sun, 14 Jun 2009 03:04:48 +0200 Subject: third try --- Plugins/OneKhDe.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Plugins/OneKhDe.py (limited to 'Plugins/OneKhDe.py') diff --git a/Plugins/OneKhDe.py b/Plugins/OneKhDe.py new file mode 100644 index 000000000..466143b34 --- /dev/null +++ b/Plugins/OneKhDe.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import re + +from module.unescape import unescape +from Plugin import Plugin + +class OneKhDe(Plugin): + + def __init__(self, parent): + Plugin.__init__(self, parent) + props = {} + props['name'] = "OneKhDe" + props['type'] = "container" + props['pattern'] = r"http://(www\.)?1kh.de/f/" + props['version'] = "0.1" + props['description'] = """kh.de Container Plugin""" + props['author_name'] = ("spoob") + props['author_mail'] = ("spoob@pyload.org") + self.props = props + self.parent = parent + self.html = None + + def file_exists(self): + """ returns True or False + """ + return True + + def proceed(self, url, location): + url = self.parent.url + self.html = self.req.load(url) + temp_links = [] + link_ids = re.findall(r"", self.req.load("http://1kh.de/l/" + id)).group(1)) + temp_links.append(new_link) + self.links = temp_links -- cgit v1.2.3