summaryrefslogtreecommitdiffstats
path: root/module/plugins/RelinkUs.py
diff options
context:
space:
mode:
authorGravatar spoob <spoob@gmx.de> 2009-09-04 15:13:57 +0200
committerGravatar spoob <spoob@gmx.de> 2009-09-04 15:13:57 +0200
commit6b5d39a18461a45e53fd4048e1ac6a5cbd075b8c (patch)
tree12c44e446f2d82785572b2577a39a96e741c34a9 /module/plugins/RelinkUs.py
parentpyLoad RC (diff)
downloadpyload-6b5d39a18461a45e53fd4048e1ac6a5cbd075b8c.tar.xz
clean root folder
Diffstat (limited to 'module/plugins/RelinkUs.py')
-rw-r--r--module/plugins/RelinkUs.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/module/plugins/RelinkUs.py b/module/plugins/RelinkUs.py
new file mode 100644
index 000000000..31f592759
--- /dev/null
+++ b/module/plugins/RelinkUs.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import re
+
+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