diff options
author | mkaay <mkaay@mkaay.de> | 2009-12-28 23:00:57 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2009-12-28 23:00:57 +0100 |
commit | 9908e7c4841b3a109ee28575052c489728d59f0f (patch) | |
tree | ada58d04b8e3ec0b9141f26722360c6352d4a109 /module/plugins/hoster/UploadedTo.py | |
parent | checksum is now optional (diff) | |
download | pyload-9908e7c4841b3a109ee28575052c489728d59f0f.tar.xz |
UploadedTo indirect download fix
Diffstat (limited to 'module/plugins/hoster/UploadedTo.py')
-rw-r--r-- | module/plugins/hoster/UploadedTo.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 0d487be46..6079003bf 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -125,10 +125,21 @@ class UploadedTo(Plugin): return False else: return True - + + def cleanUrl(self, url): + url = url.replace("ul.to/", "uploaded.to/file/") + url = url.replace("/?id=", "/file/") + url = url.replace("?id=", "file/") + url = re.sub("/\?(.*?)&id=", "/file/", url, 1) + return url + def proceed(self, url, location): if self.config['premium']: self.req.load("http://uploaded.to/login", None, { "email" : self.config['username'], "password" : self.config['password']}, cookies=True) + self.req.load(url, cookies=True, just_header=True) + if self.cleanUrl(self.req.lastEffectiveURL) == self.cleanUrl(url): + self.logger.info("UploadedTo indirect download") + url = self.cleanUrl(url)+"?redirect" self.req.download(url, location, cookies=True) else: self.req.download(url, location, cookies=False, post={"download_submit": "Free Download"}) |