summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-24 04:55:19 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-24 04:55:19 +0200
commit32c60caecd9518a08f745d14b585c99c2a414489 (patch)
tree7871887fb8538a00289262833a13f047f74672ee
parent[FilecryptCc] Version up (2) (diff)
parentUpdate UpleaCom.py (diff)
downloadpyload-32c60caecd9518a08f745d14b585c99c2a414489.tar.xz
Merge pull request #1369 from GammaC0de/GammaC0de-fix-UpleaCom
Update UpleaCom.py
-rw-r--r--module/plugins/hoster/UpleaCom.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py
index 59c593c93..039d2f552 100644
--- a/module/plugins/hoster/UpleaCom.py
+++ b/module/plugins/hoster/UpleaCom.py
@@ -10,23 +10,26 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class UpleaCom(XFSHoster):
__name__ = "UpleaCom"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__pattern__ = r'https?://(?:www\.)?uplea\.com/dl/\w{15}'
__description__ = """Uplea.com hoster plugin"""
__license__ = "GPLv3"
- __authors__ = [("Redleon", None)]
+ __authors__ = [("Redleon", None),
+ ("GammaC0de", None)]
NAME_PATTERN = r'class="agmd size18">(?P<N>.+?)<'
- SIZE_PATTERN = r'size14">(?P<S>[\d.,]+) (?P<U>[\w^_])</span>'
+ SIZE_PATTERN = r'size14">(?P<S>[\d.,]+) (?P<U>[\w^_]+?)</span>'
+ SIZE_REPLACEMENTS = [('Ko','KB'), ('Mo','MB'), ('Go','GB')]
OFFLINE_PATTERN = r'>You followed an invalid or expired link'
+ PREMIUM_PATTERN = r'You need to have a Premium subscription to download this file'
- LINK_PATTERN = r'"(http?://\w+\.uplea\.com/anonym/.*?)"'
+ LINK_PATTERN = r'"(https?://\w+\.uplea\.com/anonym/.*?)"'
- WAIT_PATTERN = r'timeText:([\d.]+),'
+ WAIT_PATTERN = r'timeText: ?([\d.]+),'
STEP_PATTERN = r'<a href="(/step/.+)">'
@@ -45,9 +48,14 @@ class UpleaCom(XFSHoster):
m = re.search(self.WAIT_PATTERN, self.html)
if m:
+ self.logDebug(_("Waiting %s seconds") % m.group(1))
self.wait(m.group(1), True)
self.retry()
+ m = re.search(self.PREMIUM_PATTERN, self.html)
+ if m:
+ self.error(_("This URL requires a premium account"))
+
m = re.search(self.LINK_PATTERN, self.html)
if m is None:
self.error(_("LINK_PATTERN not found"))