diff options
-rw-r--r-- | Plugins/RelinkUs.py | 40 | ||||
-rw-r--r-- | module/thread_list.py | 2 | ||||
-rw-r--r-- | pyLoadCore.py | 22 |
3 files changed, 52 insertions, 12 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 diff --git a/module/thread_list.py b/module/thread_list.py index bfe99c6e2..615c39243 100644 --- a/module/thread_list.py +++ b/module/thread_list.py @@ -190,4 +190,4 @@ class Thread_List(object): while ip == "": #solange versuch bis neue ip ausgelesen ip = re.match(".*Current IP Address: (.*)</body>.*", urllib2.urlopen("http://checkip.dyndns.org/").read()).group(1) time.sleep(1) - self.parent.logger.info("Reconnected, new IP: " + ip)
\ No newline at end of file + self.parent.logger.info("Reconnected, new IP: " + ip) diff --git a/pyLoadCore.py b/pyLoadCore.py index 422bf013f..0ae1fb938 100644 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -60,7 +60,7 @@ class Core(object): self.init_logger(logging.DEBUG) # logging level - self.check_update() + #self.check_update() self.logger.info(_("Downloadtime: %s") % self.is_dltime()) # debug only @@ -110,16 +110,16 @@ class Core(object): for link in links: self.append_link(link) - def check_update(self): - """checks newst version - """ - newst_version = urllib2.urlopen("http://pyload.nady.biz/files/version.txt").readline().strip() - if CURRENT_VERSION < newst_version: - self.logger.info(_("new update %s on pyload.org") % newst_version) #newer version out - elif CURRENT_VERSION == newst_version: - self.logger.info(_("newst version %s in use:") % CURRENT_VERSION) #using newst version - else: - self.logger.info(_("beta version %s in use:") % CURRENT_VERSION) #using beta version + #def check_update(self): + #"""checks newst version + #""" + #newst_version = urllib2.urlopen("http://pyload.nady.biz/files/version.txt").readline().strip() + #if CURRENT_VERSION < newst_version: + #self.logger.info(_("new update %s on pyload.org") % newst_version) #newer version out + #elif CURRENT_VERSION == newst_version: + #self.logger.info(_("newst version %s in use:") % CURRENT_VERSION) #using newst version + #else: + #self.logger.info(_("beta version %s in use:") % CURRENT_VERSION) #using beta version def check_create(self, check_name, legend, folder=True): if not exists(check_name): |