From 6b5d39a18461a45e53fd4048e1ac6a5cbd075b8c Mon Sep 17 00:00:00 2001
From: spoob
.+/(.+) ", 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/plugins/ShareonlineBiz.py b/module/plugins/ShareonlineBiz.py
new file mode 100644
index 000000000..d42ef9302
--- /dev/null
+++ b/module/plugins/ShareonlineBiz.py
@@ -0,0 +1,75 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import os
+import re
+import tempfile
+from time import time
+from base64 import b64decode
+
+from Plugin import Plugin
+
+class ShareonlineBiz(Plugin):
+
+ def __init__(self, parent):
+ Plugin.__init__(self, parent)
+ props = {}
+ props['name'] = "ShareonlineBiz"
+ props['type'] = "hoster"
+ props['pattern'] = r"(?:http://)?(?:www.)?share-online.biz/download.php\?id="
+ props['version'] = "0.1"
+ props['description'] = """Shareonline.biz Download Plugin"""
+ props['author_name'] = ("spoob")
+ props['author_mail'] = ("spoob@pyload.org")
+ self.props = props
+ self.parent = parent
+ self.html = [None, None]
+ self.want_reconnect = False
+ self.init_ocr()
+ self.multi_dl = False
+
+ def download_html(self):
+ url = self.parent.url
+ self.html[0] = self.req.load(url, cookies=True)
+
+ captcha_image = tempfile.NamedTemporaryFile(suffix=".jpg").name
+
+ for i in range(5):
+ self.req.download("http://www.share-online.biz/captcha.php", captcha_image, cookies=True)
+ captcha = self.ocr.get_captcha(captcha_image)
+ self.html[1] = self.req.load(url, post={"captchacode": captcha}, cookies=True)
+ if re.search(r"Der Download ist Ihnen zu langsam?", self.html[1]) != None:
+ self.time_plus_wait = time() + 15
+ break
+
+ os.remove(captcha_image)
+
+ def get_file_url(self):
+ """ returns the absolute downloadable filepath
+ """
+ if self.html[0] == None:
+ self.download_html()
+ if not self.want_reconnect:
+ file_url_pattern = 'loadfilelink\.decode\("(.*==)"\);'
+ return b64decode(re.search(file_url_pattern, self.html[1]).group(1))
+ else:
+ return False
+
+ def get_file_name(self):
+ if self.html[0] == None:
+ self.download_html()
+ if not self.want_reconnect:
+ file_name_pattern = 'class="locatedActive">Download (.*)'
+ return re.search(file_name_pattern, self.html[1]).group(1)
+ else:
+ return self.parent.url
+
+ def file_exists(self):
+ """ returns True or False
+ """
+ if self.html[0] == None:
+ self.download_html()
+ if re.search(r"nicht zum Download bereitgestellt werden", self.html[0]) != None:
+ return False
+ else:
+ return True
diff --git a/module/plugins/ShragleCom.py b/module/plugins/ShragleCom.py
new file mode 100644
index 000000000..bcf650d69
--- /dev/null
+++ b/module/plugins/ShragleCom.py
@@ -0,0 +1,72 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import re
+import time
+
+from Plugin import Plugin
+
+class ShragleCom(Plugin):
+
+ def __init__(self, parent):
+ Plugin.__init__(self, parent)
+ props = {}
+ props['name'] = "ShragleCom"
+ props['type'] = "hoster"
+ props['pattern'] = r"http://(?:www.)?shragle.com/files/"
+ props['version'] = "0.1"
+ props['description'] = """Shragle Download PLugin"""
+ props['author_name'] = ("RaNaN")
+ props['author_mail'] = ("RaNaN@pyload.org")
+ self.props = props
+ self.parent = parent
+ self.html = None
+ self.multi_dl = False
+
+ def set_parent_status(self):
+ """ sets all available Statusinfos about a File in self.parent.status
+ """
+ if self.html == None:
+ self.download_html()
+ self.parent.status.filename = self.get_file_name()
+ self.parent.status.url = self.get_file_url()
+ self.parent.status.wait = self.wait_until()
+
+ def download_html(self):
+ url = self.parent.url
+ self.html = self.req.load(url)
+ self.time_plus_wait = time.time() + 10
+
+ def get_file_url(self):
+ """ returns the absolute downloadable filepath
+ """
+ if self.html == None:
+ self.download_html()
+
+ self.fileID = re.search(r"name=\"fileID\" value=\"([^\"]+)", self.html).group(1)
+ self.dlSession = re.search(r"name=\"dlSession\" value=\"([^\"]+)", self.html).group(1)
+ self.userID = ""
+ self.password = ""
+ self.lang = "de"
+ return "http://srv4.shragle.com/download.php"
+
+ def get_file_name(self):
+ if self.html == None:
+ self.download_html()
+
+ file_name_pattern = r"<\/div>(.+)<\/h2"
+ return re.search(file_name_pattern, self.html).group(1)
+
+ def file_exists(self):
+ """ returns True or False
+ """
+ if self.html == None:
+ self.download_html()
+
+ if re.search(r"html", self.html) == None:
+ return False
+ else:
+ return True
+
+ def proceed(self, url, location):
+ self.req.download(url, location, {'fileID': self.fileID, 'dlSession': self.dlSession, 'userID': self.userID, 'password': self.password, 'lang': self.lang})
\ No newline at end of file
diff --git a/module/plugins/StealthTo.py b/module/plugins/StealthTo.py
new file mode 100644
index 000000000..c904a07c3
--- /dev/null
+++ b/module/plugins/StealthTo.py
@@ -0,0 +1,47 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import re
+
+from Plugin import Plugin
+
+class StealthTo(Plugin):
+
+ def __init__(self, parent):
+ Plugin.__init__(self, parent)
+ props = {}
+ props['name'] = "StealthTo"
+ props['type'] = "container"
+ props['pattern'] = r"http://(www\.)?stealth.to/folder/"
+ props['version'] = "0.1"
+ props['description'] = """Stealth.to 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, cookies=True)
+ temp_links = []
+ ids = []
+ ats = [] # authenticity_token
+ inputs = re.findall(r"(<(input|form)[^>]+)", self.html)
+ for input in inputs:
+ if re.search(r"name=\"authenticity_token\"",input[0]):
+ ats.append(re.search(r"value=\"([^\"]+)", input[0]).group(1))
+ if re.search(r"name=\"id\"",input[0]):
+ ids.append(re.search(r"value=\"([^\"]+)", input[0]).group(1))
+
+ for i in range(0, len(ids)):
+ self.req.load(url + "/web", post={"authenticity_token": ats[i], "id": str(ids[i]), "link": ("download_" + str(ids[i]))}, cookies=True)
+ new_html = self.req.load(url + "/web", post={"authenticity_token": ats[i], "id": str(ids[i]), "link": "1"}, cookies=True)
+ temp_links.append(re.search(r"iframe src=\"(.*)\" frameborder", new_html).group(1))
+
+ self.links = temp_links
diff --git a/module/plugins/UploadedTo.py b/module/plugins/UploadedTo.py
new file mode 100644
index 000000000..e65be789c
--- /dev/null
+++ b/module/plugins/UploadedTo.py
@@ -0,0 +1,97 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import re
+from time import time
+from Plugin import Plugin
+
+class UploadedTo(Plugin):
+
+ def __init__(self, parent):
+ Plugin.__init__(self, parent)
+ props = {}
+ props['name'] = "UploadedTo"
+ props['type'] = "hoster"
+ props['pattern'] = r"http://(?:www\.)?u(?:p)?l(?:oaded)?\.to/"
+ props['version'] = "0.1"
+ props['description'] = """Uploaded.to Download Plugin"""
+ props['author_name'] = ("spoob")
+ props['author_mail'] = ("spoob@pyload.org")
+ self.props = props
+ self.parent = parent
+ self.html = None
+ self.html_old = None #time() where loaded the HTML
+ self.time_plus_wait = None #time() + wait in seconds
+ self.want_reconnect = None
+ self.multi_dl = False
+
+ def prepare(self, thread):
+ pyfile = self.parent
+
+ self.want_reconnect = False
+ tries = 0
+
+ while not pyfile.status.url:
+
+ self.download_html()
+
+ pyfile.status.exists = self.file_exists()
+
+ if not pyfile.status.exists:
+ raise Exception, "The file was not found on the server."
+
+ pyfile.status.filename = self.get_file_name()
+
+ pyfile.status.waituntil = self.time_plus_wait
+ pyfile.status.url = self.get_file_url()
+ pyfile.status.want_reconnect = self.want_reconnect
+
+ thread.wait(self.parent)
+
+ pyfile.status.filename = self.get_file_name()
+
+ tries += 1
+ if tries > 5:
+ raise Exception, "Error while preparing DL, HTML dump: %s" % self.html
+
+ return True
+
+ def download_html(self):
+ url = self.parent.url
+ self.html = self.req.load(url)
+
+ try:
+ wait_minutes = re.search(r"Or wait ([\d\-]+) minutes", self.html).group(1)
+ if int(wait_minutes) < 0: wait_minutes = 1
+ self.time_plus_wait = time() + 60 * int(wait_minutes)
+ self.want_reconnect = True
+ except:
+ self.time_plus_wait = 0
+
+ def get_file_url(self):
+ """ returns the absolute downloadable filepath
+ """
+ try:
+ file_url_pattern = r".*
\s+(.+)\s", self.html).group(1)
+ file_suffix = re.search(r" (\..+) ", self.html)
+ if not file_suffix:
+ return file_name
+ return file_name + file_suffix.group(1)
+ except:
+ self.parent.status.url = None
+ return self.parent.url
+
+ def file_exists(self):
+ """ returns True or False
+ """
+ if re.search(r"(File doesn't exist .*)", self.html) != None:
+ return False
+ else:
+ return True
diff --git a/module/plugins/XupIn.py b/module/plugins/XupIn.py
new file mode 100644
index 000000000..6b1f3be73
--- /dev/null
+++ b/module/plugins/XupIn.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import re
+from Plugin import Plugin
+
+class XupIn(Plugin):
+
+ def __init__(self, parent):
+ Plugin.__init__(self, parent)
+ props = {}
+ props['name'] = "XupIn"
+ props['type'] = "hoster"
+ props['pattern'] = r"http://(?:www.)?xup.in/"
+ props['version'] = "0.1"
+ props['description'] = """Xup.in Download Plugin"""
+ props['author_name'] = ("spoob")
+ props['author_mail'] = ("spoob@pyload.org")
+ self.props = props
+ self.parent = parent
+ self.html = None
+ self.html_old = None #time() where loaded the HTML
+ self.time_plus_wait = None #time() + wait in seconds
+ self.posts = {}
+ self.want_reconnect = None
+ self.multi_dl = False
+
+ def download_html(self):
+ url = self.parent.url
+ self.html = self.req.load(url)
+ self.posts["vid"] = re.search('"hidden" value="(.*)" name="vid"', self.html).group(1)
+ self.posts["vtime"] = re.search('"hidden" value="(.*)" name="vtime"', self.html).group(1)
+
+ def get_file_url(self):
+ """ returns the absolute downloadable filepath
+ """
+ if self.html == None:
+ self.download_html()
+ if not self.want_reconnect:
+ file_url_pattern = r".*
", self.html).group(1)
+ return file_name
+ else:
+ return self.parent.url
+
+ def file_exists(self):
+ """ returns True or False
+ """
+ if self.html == None:
+ self.download_html()
+ if re.search(r"HTTP Status 404", self.html) != None:
+ return False
+ else:
+ return True
+
+ def proceed(self, url, location):
+
+ self.req.download(url, location, cookies=True)
diff --git a/module/plugins/ZshareNet.py b/module/plugins/ZshareNet.py
new file mode 100644
index 000000000..33667605f
--- /dev/null
+++ b/module/plugins/ZshareNet.py
@@ -0,0 +1,72 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import re
+from Plugin import Plugin
+
+class ZshareNet(Plugin):
+
+ def __init__(self, parent):
+ Plugin.__init__(self, parent)
+ props = {}
+ props['name'] = "ZshareNet"
+ props['type'] = "hoster"
+ props['pattern'] = r"http://(?:www.)?zshare.net/"
+ props['version'] = "0.1"
+ props['description'] = """Zshare.net Download Plugin"""
+ props['author_name'] = ("spoob")
+ props['author_mail'] = ("spoob@pyload.org")
+ self.props = props
+ self.parent = parent
+ self.html = [None, None]
+ self.html_old = None #time() where loaded the HTML
+ self.time_plus_wait = None #time() + wait in seconds
+ self.posts = {}
+ self.want_reconnect = False
+ self.multi_dl = False
+
+ def download_html(self):
+ url = self.parent.url
+ self.html[0] = self.req.load(url)
+ if "/video/" in url:
+ url = url.replace("/video/", "/download/")
+ elif "/audio/" in url:
+ url = url.replace("/audio/", "/download/")
+ elif "/image/" in url:
+ url = url.replace("/image/", "/download/")
+ self.html[1] = self.req.load(url, None, {"download": "1"})
+
+ def get_file_url(self):
+ """ returns the absolute downloadable filepath
+ """
+ if self.html[0] == None:
+ self.download_html()
+ if not self.want_reconnect:
+ file_url = "".join(eval(re.search("var link_enc=new Array(.*);link", self.html[1]).group(1)))
+ return file_url
+ else:
+ return False
+
+ def get_file_name(self):
+ if self.html[0] == None:
+ self.download_html()
+ if not self.want_reconnect:
+ file_name = re.search("(.*)", self.html[0]).group(1)
+ return file_name
+ else:
+ return self.parent.url
+
+ def file_exists(self):
+ """ returns True or False
+ """
+ if self.html[0] == None:
+ self.download_html()
+ if re.search(r"File Not Found", self.html[0]) != None:
+ return False
+ else:
+ return True
+
+ def wait_until(self):
+ if self.html[0] == None:
+ self.download_html()
+ return self.time_plus_wait
diff --git a/module/plugins/__init__.py b/module/plugins/__init__.py
new file mode 100644
index 000000000..8d1c8b69c
--- /dev/null
+++ b/module/plugins/__init__.py
@@ -0,0 +1 @@
+
--
cgit v1.2.3