summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/UpleaCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/UpleaCom.py')
-rw-r--r--module/plugins/hoster/UpleaCom.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py
index 608282a60..4538b1c16 100644
--- a/module/plugins/hoster/UpleaCom.py
+++ b/module/plugins/hoster/UpleaCom.py
@@ -22,18 +22,19 @@ class UpleaCom(XFSHoster):
DISPOSITION = False #@TODO: Remove in 0.4.10
- NAME_PATTERN = r'<span class="gold-text">(?P<N>.+?)</span>'
- SIZE_PATTERN = r'<span class="label label-info agmd">(?P<S>[\d.,]+) (?P<U>[\w^_]+?)</span>'
+ HOSTER_DOMAIN = "uplea.com"
+
SIZE_REPLACEMENTS = [('ko','KB'), ('mo','MB'), ('go','GB'), ('Ko','KB'), ('Mo','MB'), ('Go','GB')]
+ NAME_PATTERN = r'<span class="gold-text">(?P<N>.+?)</span>'
+ SIZE_PATTERN = r'<span class="label label-info agmd">(?P<S>[\d.,]+) (?P<U>[\w^_]+?)</span>'
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'"(https?://\w+\.uplea\.com/anonym/.*?)"'
- HOSTER_DOMAIN = "uplea.com"
- WAIT_PATTERN = r'timeText: ?([\d.]+),'
- STEP_PATTERN = r'<a href="(/step/.+)">'
+ PREMIUM_ONLY_PATTERN = r'You need to have a Premium subscription to download this file'
+ WAIT_PATTERN = r'timeText: ?([\d.]+),'
+ STEP_PATTERN = r'<a href="(/step/.+)">'
def setup(self):
@@ -55,10 +56,6 @@ class UpleaCom(XFSHoster):
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"))