From eaa92b25ba8ab7f744b18994f178644555adbac3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 04:33:46 +0100 Subject: New hoster plugin UpleaCom --- module/plugins/hoster/UpleaCom.py | 56 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 module/plugins/hoster/UpleaCom.py (limited to 'module/plugins/hoster/UpleaCom.py') diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py new file mode 100644 index 000000000..877bcc217 --- /dev/null +++ b/module/plugins/hoster/UpleaCom.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- + +import re + +from module.plugins.internal.XFSPHoster import XFSPHoster, create_getInfo + + +class UpleaCom(XFSPHoster): + __name__ = "UpleaCom" + __type__ = "hoster" + __version__ = "0.02" + + __pattern__ = r'https?://(?:www\.)?uplea\.com/dl/\w{15}' + + __description__ = """Uplea.com hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("Redleon", None)] + + + HOSTER_NAME = "uplea.com" + + FILE_INFO_PATTERN = r'class="l download-filename">\s(?P.+)\s(?P[\d.]+) (?P[\w]).*?' + OFFLINE_PATTERN = r'You followed an invalid or expired link' + + LINK_PATTERN = r'"(http?://\w+\.uplea\.com/anonym/.*?)"' + WAIT_PATTERN = r'timeText:([\d.]+),' + VARS_PATTERN = r'class="cel_tbl_step1_foot">\s' + + + def setup(self): + self.multiDL = False + self.chunkLimit = 1 + self.resumeDownload = True + + + def handleFree(self): + m = re.search(self.VARS_PATTERN, self.html) + if m is None: + self.error("VARS_PATTERN not found") + + self.html = self.load('http://uplea.com%s' % m.groups(1)) + + m = re.search(self.WAIT_PATTERN, self.html) + if m: + self.wantReconnect = True + self.retry(1, m.group(1)) + + m = re.search(self.LINK_PATTERN, self.html) + if m is None: + self.error("LINK_PATTERN not found") + + self.wait(15) + self.download(m.group(1), disposition=True) + + +getInfo = create_getInfo(UpleaCom) -- cgit v1.2.3 From 8b3589dd394d81177bf4680dddb5bdb9506b89ea Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:04:10 +0100 Subject: Update plugins to last changes --- module/plugins/hoster/UpleaCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/UpleaCom.py') diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py index 877bcc217..5ca9f2e40 100644 --- a/module/plugins/hoster/UpleaCom.py +++ b/module/plugins/hoster/UpleaCom.py @@ -42,8 +42,8 @@ class UpleaCom(XFSPHoster): m = re.search(self.WAIT_PATTERN, self.html) if m: - self.wantReconnect = True - self.retry(1, m.group(1)) + self.wait(m.group(1), True) + self.retry() m = re.search(self.LINK_PATTERN, self.html) if m is None: -- cgit v1.2.3 From 772e47ef806d18fd209e910be0535bce7c07dc7b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 2 Nov 2014 22:47:07 +0100 Subject: Update all other plugins --- module/plugins/hoster/UpleaCom.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/UpleaCom.py') diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py index 5ca9f2e40..4b253d2ce 100644 --- a/module/plugins/hoster/UpleaCom.py +++ b/module/plugins/hoster/UpleaCom.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.XFSPHoster import XFSPHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo -class UpleaCom(XFSPHoster): +class UpleaCom(XFSHoster): __name__ = "UpleaCom" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'https?://(?:www\.)?uplea\.com/dl/\w{15}' @@ -17,9 +17,9 @@ class UpleaCom(XFSPHoster): __authors__ = [("Redleon", None)] - HOSTER_NAME = "uplea.com" + HOSTER_DOMAIN = "uplea.com" - FILE_INFO_PATTERN = r'class="l download-filename">\s(?P.+)\s(?P[\d.]+) (?P[\w]).*?' + INFO_PATTERN = r'class="l download-filename">\s(?P.+)\s(?P[\d.]+) (?P[\w]).*?' OFFLINE_PATTERN = r'You followed an invalid or expired link' LINK_PATTERN = r'"(http?://\w+\.uplea\.com/anonym/.*?)"' -- cgit v1.2.3 From a7e898fd5f5f3d58def57bc1c32b810f137fbfb9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 7 Nov 2014 23:41:51 +0100 Subject: [UpleaCom] Update patterns --- module/plugins/hoster/UpleaCom.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/UpleaCom.py') diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py index 4b253d2ce..409d7b4ca 100644 --- a/module/plugins/hoster/UpleaCom.py +++ b/module/plugins/hoster/UpleaCom.py @@ -2,13 +2,15 @@ import re +from urlparse import urljoin + from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo class UpleaCom(XFSHoster): __name__ = "UpleaCom" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'https?://(?:www\.)?uplea\.com/dl/\w{15}' @@ -19,8 +21,10 @@ class UpleaCom(XFSHoster): HOSTER_DOMAIN = "uplea.com" - INFO_PATTERN = r'class="l download-filename">\s(?P.+)\s(?P[\d.]+) (?P[\w]).*?' - OFFLINE_PATTERN = r'You followed an invalid or expired link' + NAME_PATTERN = r'class="agmd size18">(?P.+?)<' + SIZE_PATTERN = r'size14">(?P[\d.,]+) (?P[\w^_])' + + OFFLINE_PATTERN = r'>You followed an invalid or expired link' LINK_PATTERN = r'"(http?://\w+\.uplea\.com/anonym/.*?)"' WAIT_PATTERN = r'timeText:([\d.]+),' @@ -38,7 +42,7 @@ class UpleaCom(XFSHoster): if m is None: self.error("VARS_PATTERN not found") - self.html = self.load('http://uplea.com%s' % m.groups(1)) + self.html = self.load(urljoin("http://uplea.com/", m.groups(1))) m = re.search(self.WAIT_PATTERN, self.html) if m: -- cgit v1.2.3