summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/plugins/RapidshareCom.py2
-rw-r--r--module/plugins/UploadedTo.py13
-rwxr-xr-xpyLoadCore.py1
3 files changed, 4 insertions, 12 deletions
diff --git a/module/plugins/RapidshareCom.py b/module/plugins/RapidshareCom.py
index 7eeddf007..63570c566 100644
--- a/module/plugins/RapidshareCom.py
+++ b/module/plugins/RapidshareCom.py
@@ -25,7 +25,6 @@ class RapidshareCom(Plugin):
self.html_old = None #time() where loaded the HTML
self.time_plus_wait = None #time() + wait in seconds
self.want_reconnect = False
-
self.read_config()
if self.config['premium']:
self.multi_dl = True
@@ -161,7 +160,6 @@ class RapidshareCom(Plugin):
#if (self.html_old + 5 * 60) < time(): # nach einiger zeit ist die file_url nicht mehr aktuell
# self.download_serverhtml()
-
try:
if self.api_data and self.api_data["mirror"]:
return self.api_data["mirror"]
diff --git a/module/plugins/UploadedTo.py b/module/plugins/UploadedTo.py
index 89ad9e4e8..f8bf87d6e 100644
--- a/module/plugins/UploadedTo.py
+++ b/module/plugins/UploadedTo.py
@@ -13,7 +13,7 @@ class UploadedTo(Plugin):
props = {}
props['name'] = "UploadedTo"
props['type'] = "hoster"
- props['pattern'] = r"http://(?:www\.)?u(?:p)?l(?:oaded)?\.to/"
+ props['pattern'] = r"http://(?:www\.)?u(?:p)?l(?:oaded)?\.to/(?:file/)?(.*)"
props['version'] = "0.3"
props['description'] = """Uploaded.to Download Plugin"""
props['author_name'] = ("spoob", "mkaay")
@@ -24,12 +24,7 @@ class UploadedTo(Plugin):
self.html_old = None #time() where loaded the HTML
self.time_plus_wait = None #time() + wait in seconds
self.api_data = None
-
- self.longUrlRegex = re.compile(r"uploaded.to/file/(.*?)/")
- self.shortUrlRegex = re.compile(r"ul.to/(.*)")
-
self.want_reconnect = False
-
self.read_config()
if self.config['premium']:
self.multi_dl = True
@@ -80,11 +75,9 @@ class UploadedTo(Plugin):
def download_api_data(self):
url = self.parent.url
- match = self.longUrlRegex.search(url)
- if not match:
- match = self.shortUrlRegex.search(url)
+ match = re.compile(self.props['pattern']).search(url)
if match:
- src = self.req.load("http://uploaded.to/api/file", cookies=False, get={"id": match.group(1)})
+ src = self.req.load("http://uploaded.to/api/file", cookies=False, get={"id": match.group(1).split("?")[0]})
if not src.find("404 Not Found"):
return
self.api_data = {}
diff --git a/pyLoadCore.py b/pyLoadCore.py
index 2408c999c..9c9d468b4 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -151,6 +151,7 @@ class Core(object):
for line in open(file_handler, "r").readlines():
if "props['pattern']" in line:
plugin_pattern = line.split("r\"")[1].split("\"")[0]
+ break
if plugin_pattern != "":
self.plugins_avaible[plugin_file] = plugin_pattern
self.logger.debug(plugin_file + _(" added"))