diff options
author | spoob <spoob@gmx.de> | 2009-06-14 16:28:26 +0200 |
---|---|---|
committer | spoob <spoob@gmx.de> | 2009-06-14 16:28:26 +0200 |
commit | 266c2401176a05bc0e808621ecfeaabecd1e5b44 (patch) | |
tree | 8249ec5d5efc7ea34f0d94f29c265e8af6e8ba64 /Plugins/RelinkUs.py | |
parent | third try (diff) | |
download | pyload-266c2401176a05bc0e808621ecfeaabecd1e5b44.tar.xz |
added relink.os Container Plugin
Diffstat (limited to 'Plugins/RelinkUs.py')
-rw-r--r-- | Plugins/RelinkUs.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Plugins/RelinkUs.py b/Plugins/RelinkUs.py new file mode 100644 index 000000000..51176ec31 --- /dev/null +++ b/Plugins/RelinkUs.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import re + +from module.unescape import unescape +from Plugin import Plugin + +class RelinkUs(Plugin): + + def __init__(self, parent): + Plugin.__init__(self, parent) + props = {} + props['name'] = "RelinkUs" + props['type'] = "container" + props['pattern'] = r"http://(www\.)?relink.us/go.php" + props['version'] = "0.1" + props['description'] = """Relink.us 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) + container_id = url.split("id=")[-1] + temp_links = [] + link_number = len(re.findall(r"test_\d+", self.html)) + for number in range(0, link_number): + new_link = re.search("src='(.*)'></iframe>", self.req.load("http://relink.us/f/%s/1/%i" % (container_id, number))).group(1) + temp_links.append(new_link) + print temp_links + self.links = temp_links |