summaryrefslogtreecommitdiffstats
path: root/module/plugins/RelinkUs.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2009-12-27 00:20:21 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2009-12-27 00:20:21 +0100
commit8e87787753b2e049917a5491727d285b1c5a7095 (patch)
tree9b23fb14b0f1270edc4582758bcf3a39cfd97b67 /module/plugins/RelinkUs.py
parentcloses #42 (diff)
downloadpyload-8e87787753b2e049917a5491727d285b1c5a7095.tar.xz
closes #13
Diffstat (limited to 'module/plugins/RelinkUs.py')
-rw-r--r--module/plugins/RelinkUs.py60
1 files changed, 0 insertions, 60 deletions
diff --git a/module/plugins/RelinkUs.py b/module/plugins/RelinkUs.py
deleted file mode 100644
index 71b441116..000000000
--- a/module/plugins/RelinkUs.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-import re
-import time
-
-from module.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/(f|((view|go).php))"
- props['version'] = "1"
- props['description'] = """Relink.us Container Plugin"""
- props['author_name'] = ("Sleeper-", "spoob")
- props['author_mail'] = ("@nonymous", "spoob@pyload.org")
- self.props = props
- self.parent = parent
- self.html = None
- self.multi_dl = False
-
- def file_exists(self):
- """ returns True or False
- """
- return True
-
- def proceed(self, url, location):
- container_id = self.parent.url.split("/")[-1].split("id=")[-1]
- url = "http://relink.us/view.php?id="+container_id
- self.html = self.req.load(url, cookies=True)
- temp_links = []
-
- # Download Ad-Frames, otherwise we aren't enabled for download
- iframes = re.findall("src=['\"]([^'\"]*)['\"](.*)></iframe>", self.html)
- for iframe in iframes:
- self.req.load("http://relink.us/"+iframe[0], cookies=True)
-
- link_strings = re.findall(r"onclick=\"getFile\(\'([^)]*)\'\);changeBackgroundColor", self.html)
-
- for link_string in link_strings:
- self.req.lastURL = url
-
- # Set Download File
- framereq = self.req.load("http://relink.us/frame.php?"+link_string, cookies=True)
-
- new_link = self.req.lastEffectiveURL
-
- if re.match(r"http://(www\.)?relink.us/",new_link):
- # Find iframe
- new_link = re.search("src=['\"]([^'\"]*)['\"](.*)></iframe>", framereq).group(1)
- # Wait some secs for relink.us server...
- time.sleep(5)
-
- temp_links.append(new_link)
-
- self.links = temp_links