summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-28 04:33:46 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-28 04:33:46 +0100
commiteaa92b25ba8ab7f744b18994f178644555adbac3 (patch)
tree36fe2bf8dccdba7cc9b385331ffb1a2fd52f0a77
parentUpdate __config__ (diff)
downloadpyload-eaa92b25ba8ab7f744b18994f178644555adbac3.tar.xz
New hoster plugin UpleaCom
-rw-r--r--module/plugins/hoster/UpleaCom.py56
1 files changed, 56 insertions, 0 deletions
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<span.*?>(?P<N>.+)</span>\s<span.*?>(?P<S>[\d.]+) (?P<U>[\w]).*?</span>'
+ 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<a href="(/step/.+)">'
+
+
+ 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)