summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2009-11-10 23:16:26 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2009-11-10 23:16:26 +0100
commit7c50993e16a6adaa4bdb5f615c9e6cf279c16316 (patch)
tree3f247b49435bc383c24f649f1d34a0ad98096ece /module
parentbetter uploaded pattern (diff)
downloadpyload-7c50993e16a6adaa4bdb5f615c9e6cf279c16316.tar.xz
fixed regex for uploaded.to
Diffstat (limited to 'module')
-rwxr-xr-xmodule/network/Request.py7
-rw-r--r--module/plugins/RapidshareCom.py4
-rw-r--r--module/plugins/UploadedTo.py2
3 files changed, 5 insertions, 8 deletions
diff --git a/module/network/Request.py b/module/network/Request.py
index 6799563ac..ce07d9c90 100755
--- a/module/network/Request.py
+++ b/module/network/Request.py
@@ -114,12 +114,10 @@ class Request:
if get:
get = urllib.urlencode(get)
+ url = "%s?%s" % (url, get)
else:
get = ""
- url = "%s?%s" % (url, get)
-
-
if self.curl:
self.pycurl.setopt(pycurl.URL, url)
@@ -219,11 +217,10 @@ class Request:
if get:
get = urllib.urlencode(get)
+ url = "%s?%s" % (url, get)
else:
get = ""
- url = "%s?%s" % (url, get)
-
if self.curl:
file_temp = file_name + ".part"
diff --git a/module/plugins/RapidshareCom.py b/module/plugins/RapidshareCom.py
index 63570c566..5044c2e00 100644
--- a/module/plugins/RapidshareCom.py
+++ b/module/plugins/RapidshareCom.py
@@ -82,8 +82,8 @@ class RapidshareCom(Plugin):
api_param = {"sub": "checkfiles_v1", "files": "", "filenames": "", "incmd5": "1"}
m = re.compile(self.props['pattern']).search(url)
if m:
- api_param["files"] = m.group(3)
- api_param["filenames"] = m.group(4)
+ api_param["files"] = m.group(1)
+ api_param["filenames"] = m.group(2)
src = self.req.load(api_url_base, cookies=False, get=api_param)
if not src.find("ERROR"):
return
diff --git a/module/plugins/UploadedTo.py b/module/plugins/UploadedTo.py
index f8bf87d6e..9ae008480 100644
--- a/module/plugins/UploadedTo.py
+++ b/module/plugins/UploadedTo.py
@@ -77,7 +77,7 @@ class UploadedTo(Plugin):
url = self.parent.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).split("?")[0]})
+ 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 = {}