diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-30 19:20:11 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-30 19:20:11 +0200 |
commit | cc5accb444abc29bd0e23e6a0f78cf5f5a993640 (patch) | |
tree | 597ca180a2ea31c351cedb52d661a19373930f24 /module/plugins/hoster/UpleaCom.py | |
parent | Merge pull request #1381 from GammaC0de/GammaC0de-UpleaCom-size (diff) | |
download | pyload-cc5accb444abc29bd0e23e6a0f78cf5f5a993640.tar.xz |
Spare code cosmetics
Diffstat (limited to 'module/plugins/hoster/UpleaCom.py')
-rw-r--r-- | module/plugins/hoster/UpleaCom.py | 17 |
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")) |