From 752760ce6ddf8a5c980b8c84c2f196a975ab7666 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Mon, 27 Feb 2012 23:53:39 +0100 Subject: closed #548 --- module/plugins/hoster/UploadedTo.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 656977426..00ffeae94 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -84,10 +84,10 @@ 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.54" + __version__ = "0.55" __description__ = """Uploaded.to Download Hoster""" - __author_name__ = ("spoob", "mkaay") - __author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de") + __author_name__ = ("spoob", "mkaay", "zoidberg") + __author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de", "zoidberg@mujmail.cz") FILE_INFO_PATTERN = r'(?P[^<]+)  \s*]*>(?P[^<]+)' FILE_OFFLINE_PATTERN = r'Error: 404' @@ -157,8 +157,20 @@ class UploadedTo(Hoster): self.resetAccount() self.fail(_("Traffic exceeded")) - self.download("http://uploaded.to/file/%s/ddl" % self.fileID) - + header = self.load("http://uploaded.to/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) + found = re.search(r'