From 22964e6be98edde30e44610db56aea98dd730f15 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Tue, 14 Aug 2012 23:05:30 +0200 Subject: uploaded.to -> uploaded.net --- module/plugins/accounts/UploadedTo.py | 14 +++++++------- module/plugins/hoster/UploadedTo.py | 30 +++++++++++++++--------------- 2 files changed, 22 insertions(+), 22 deletions(-) (limited to 'module') diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py index 1fdebae16..e10b93e8d 100644 --- a/module/plugins/accounts/UploadedTo.py +++ b/module/plugins/accounts/UploadedTo.py @@ -23,16 +23,16 @@ from time import time class UploadedTo(Account): __name__ = "UploadedTo" - __version__ = "0.22" + __version__ = "0.23" __type__ = "account" - __description__ = """ul.to account plugin""" + __description__ = """ul.net account plugin""" __author_name__ = ("mkaay") __author_mail__ = ("mkaay@mkaay.de") def loadAccountInfo(self, user, req): - req.load("http://uploaded.to/language/en") - html = req.load("http://uploaded.to/me") + req.load("http://uploaded.net/language/en") + html = req.load("http://uploaded.net/me") premium = 'Premium' in html or 'Premium' in html @@ -56,10 +56,10 @@ class UploadedTo(Account): def login(self, user, data, req): - req.load("http://uploaded.to/language/en") - req.cj.setCookie("uploaded.to", "lang", "en") + req.load("http://uploaded.net/language/en") + req.cj.setCookie("uploaded.net", "lang", "en") - page = req.load("http://uploaded.to/io/login", post={ "id" : user, "pw" : data["password"], "_" : ""}) + page = req.load("http://uploaded.net/io/login", post={ "id" : user, "pw" : data["password"], "_" : ""}) if "User and password do not match!" in page: self.wrongPassword() diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 5fc14db72..b8b5c2565 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -12,18 +12,18 @@ from module.plugins.Plugin import chunks key = "bGhGMkllZXByd2VEZnU5Y2NXbHhYVlZ5cEE1bkEzRUw=".decode('base64') def correctDownloadLink(url): - url = re.sub("http://.*?/", "http://uploaded.to/",url, 1) - url = re.sub("\\.to/.*?id=", ".to/file/", url, 1) + url = re.sub("http://.*?/", "http://uploaded.net/",url, 1) + url = re.sub("\\.net/.*?id=", ".net/file/", url, 1) if "/file/" not in url: - url = url.replace("uploaded.to/", "uploaded.to/file/") + url = url.replace("uploaded.net/", "uploaded.net/file/") parts = url.split("/") return "/".join(parts[:min(5,len(parts))]) + "/" def getID(url): """ returns id of corrected url""" - return re.search(r"uploaded.to/file/([^/]+)", url).group(1) + return re.search(r"uploaded.net/file/([^/\?]+)", url).group(1) def getAPIData(urls): post = {"apikey" : key} @@ -36,7 +36,7 @@ def getAPIData(urls): post["id_%s" % i] = id idMap[id] = url - api = unicode(getURL("http://uploaded.to/api/filemultiple", post=post, decode=False), 'iso-8859-1') + api = unicode(getURL("http://uploaded.net/api/filemultiple", post=post, decode=False), 'iso-8859-1') result = {} @@ -83,9 +83,9 @@ def getInfo(urls): class UploadedTo(Hoster): __name__ = "UploadedTo" __type__ = "hoster" - __pattern__ = r"(http://[\w\.-]*?uploaded\.to/.*?(file/|\?id=|&id=)[\w]+/?)|(http://[\w\.]*?ul\.to/(\?id=|&id=)?[\w\-]+/.+)|(http://[\w\.]*?ul\.to/(\?id=|&id=)?[\w\-]+/?)" - __version__ = "0.58" - __description__ = """Uploaded.to Download Hoster""" + __pattern__ = r"(http://[\w\.-]*?(uploaded\.(to|net)|ul\.net)/.*?(file/|\?id=|&id=)[\w]+/?)" + __version__ = "0.59" + __description__ = """Uploaded.net Download Hoster""" __author_name__ = ("spoob", "mkaay", "zoidberg", "netpok") __author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de", "zoidberg@mujmail.cz", "netpok@gmail.com") @@ -109,8 +109,8 @@ class UploadedTo(Hoster): self.fileID = getID(self.pyfile.url) def process(self, pyfile): - self.req.cj.setCookie("uploaded.to", "lang", "en") # doesn't work anymore - self.load("http://uploaded.to/language/en",just_header=True) + self.req.cj.setCookie("uploaded.net", "lang", "en") # doesn't work anymore + self.load("http://uploaded.net/language/en") api = getAPIData([pyfile.url]) @@ -158,14 +158,14 @@ class UploadedTo(Hoster): self.resetAccount() self.fail(_("Traffic exceeded")) - header = self.load("http://uploaded.to/file/%s" % self.fileID, just_header=True) + header = self.load("http://uploaded.net/file/%s" % self.fileID, just_header=True) if "location" in header: #Direct download print "Direct Download: " + header['location'] self.download(header['location']) else: #Indirect download - self.html = self.load("http://uploaded.to/file/%s" % self.fileID) + self.html = self.load("http://uploaded.net/file/%s" % self.fileID) found = re.search(r'