diff options
author | mkaay <mkaay@mkaay.de> | 2009-12-27 00:20:21 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2009-12-27 00:20:21 +0100 |
commit | 8e87787753b2e049917a5491727d285b1c5a7095 (patch) | |
tree | 9b23fb14b0f1270edc4582758bcf3a39cfd97b67 /module/plugins/decrypter/OneKhDe.py | |
parent | closes #42 (diff) | |
download | pyload-8e87787753b2e049917a5491727d285b1c5a7095.tar.xz |
closes #13
Diffstat (limited to 'module/plugins/decrypter/OneKhDe.py')
-rw-r--r-- | module/plugins/decrypter/OneKhDe.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/module/plugins/decrypter/OneKhDe.py b/module/plugins/decrypter/OneKhDe.py new file mode 100644 index 000000000..5f24b543a --- /dev/null +++ b/module/plugins/decrypter/OneKhDe.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import re + +from module.unescape import unescape +from module.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'] = """1kh.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"<a id=\"DownloadLink_(\d*)\" href=\"http://1kh.de/", self.html) + for id in link_ids: + new_link = unescape(re.search("width=\"100%\" src=\"(.*)\"></iframe>", self.req.load("http://1kh.de/l/" + id)).group(1)) + temp_links.append(new_link) + self.links = temp_links |