From 4a0c988f61d2bf64d2758f8bab1d31bd7116f568 Mon Sep 17 00:00:00 2001 From: mkaay Date: Sat, 5 Feb 2011 21:30:49 +0100 Subject: uploading.com premium --- module/plugins/hoster/UploadingCom.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/UploadingCom.py b/module/plugins/hoster/UploadingCom.py index 5843180a7..1f3889f0e 100644 --- a/module/plugins/hoster/UploadingCom.py +++ b/module/plugins/hoster/UploadingCom.py @@ -30,16 +30,18 @@ class UploadingCom(Hoster): __name__ = "UploadingCom" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?uploading\.com/files/(?:get/)?[\w\d]+/?" - __version__ = "0.1" + __version__ = "0.2" __description__ = """Uploading.Com File Download Hoster""" - __author_name__ = ("jeix") - __author_mail__ = ("jeix@hasnomail.de") + __author_name__ = ("jeix", "mkaay") + __author_mail__ = ("jeix@hasnomail.de", "mkaay@mkaay.de") def setup(self): self.html = [None,None,None] if self.account: - self.req.canContinue = True + self.resumeDownload = True + self.multiDL = True else: + self.resumeDownload = False self.multiDL = False def process(self, pyfile): @@ -66,7 +68,17 @@ class UploadingCom(Hoster): self.download(url) def handlePremium(self): - pass + postData = {} + postData['action'] = 'get_link' + postData['code'] = re.search('code: "(.*?)",', self.html[0]).group(1) + postData['pass'] = 'undefined' + + self.html[2] = self.load('http://uploading.com/files/get/?JsHttpRequest=%d-xml' % timestamp(), post=postData) + url = re.search(r'"link"\s*:\s*"(.*?)"', self.html[2]) + if url: + return url.group(1).replace("\\/", "/") + + raise Exception("Plugin defect.") def handleFree(self): self.code = re.search(r'name="code" value="(.*?)"', self.html[0]).group(1) -- cgit v1.2.3