summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar spoob <spoob@gmx.de> 2009-11-10 22:35:44 +0100
committerGravatar spoob <spoob@gmx.de> 2009-11-10 22:35:44 +0100
commit3ddb6aef1bfbe1a8684c22a1afca2a87f3a830d1 (patch)
tree14253774263963918f40c8fda361aacf65d4184f /module/plugins
parentnetload checksum check (diff)
downloadpyload-3ddb6aef1bfbe1a8684c22a1afca2a87f3a830d1.tar.xz
better uploaded pattern
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/RapidshareCom.py2
-rw-r--r--module/plugins/UploadedTo.py13
2 files changed, 3 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 = {}