From 6c75c0363f496df86e9c744a9a946f86f82715fa Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 2 Jan 2016 16:01:56 +0100 Subject: Spare code cosmetics --- module/plugins/accounts/CzshareCom.py | 2 +- module/plugins/accounts/DepositfilesCom.py | 2 +- module/plugins/accounts/FilerNet.py | 2 +- module/plugins/accounts/FreakshareCom.py | 2 +- module/plugins/accounts/FshareVn.py | 2 +- module/plugins/accounts/HellshareCz.py | 2 +- module/plugins/accounts/SmoozedCom.py | 2 +- module/plugins/accounts/TusfilesNet.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) (limited to 'module/plugins/accounts') diff --git a/module/plugins/accounts/CzshareCom.py b/module/plugins/accounts/CzshareCom.py index 7b61db9f6..8852b5998 100644 --- a/module/plugins/accounts/CzshareCom.py +++ b/module/plugins/accounts/CzshareCom.py @@ -18,7 +18,7 @@ class CzshareCom(Account): ("stickell", "l.stickell@yahoo.it")] - CREDIT_LEFT_PATTERN = r'\s*([\d ,]+) (KiB|MiB|GiB)\s*([^<]*)\s*' + CREDIT_LEFT_PATTERN = r'\s*([\d ,]+) (KiB|MiB|GiB)\s*(.*?)\s*' def grab_info(self, user, password, data): diff --git a/module/plugins/accounts/DepositfilesCom.py b/module/plugins/accounts/DepositfilesCom.py index f9f97c1ce..e8e7e44f0 100644 --- a/module/plugins/accounts/DepositfilesCom.py +++ b/module/plugins/accounts/DepositfilesCom.py @@ -21,7 +21,7 @@ class DepositfilesCom(Account): def grab_info(self, user, password, data): html = self.load("https://dfiles.eu/de/gold/") - validuntil = re.search(r"Sie haben Gold Zugang bis: (.*?)", html).group(1) + validuntil = re.search(r'Sie haben Gold Zugang bis: (.*?)', html).group(1) validuntil = time.mktime(time.strptime(validuntil, "%Y-%m-%d %H:%M:%S")) diff --git a/module/plugins/accounts/FilerNet.py b/module/plugins/accounts/FilerNet.py index c3759d5e3..a8ce870b3 100644 --- a/module/plugins/accounts/FilerNet.py +++ b/module/plugins/accounts/FilerNet.py @@ -19,7 +19,7 @@ class FilerNet(Account): TOKEN_PATTERN = r'name="_csrf_token" value="(.+?)"' WALID_UNTIL_PATTERN = r'Der Premium-Zugang ist gültig bis (.+)\.\s*' - TRAFFIC_PATTERN = r'Traffic\s*([^<]+)' + TRAFFIC_PATTERN = r'Traffic\s*(.+?)' FREE_PATTERN = r'Account Status\s*\s*Free' diff --git a/module/plugins/accounts/FreakshareCom.py b/module/plugins/accounts/FreakshareCom.py index 5f733b56d..61ce99540 100644 --- a/module/plugins/accounts/FreakshareCom.py +++ b/module/plugins/accounts/FreakshareCom.py @@ -32,7 +32,7 @@ class FreakshareCom(Account): pass try: - m = re.search(r'Traffic verbleibend:\s*([^<]+)', html, re.M) + m = re.search(r'Traffic verbleibend:\s*(.+?)', html, re.M) trafficleft = self.parse_traffic(m.group(1)) except Exception: diff --git a/module/plugins/accounts/FshareVn.py b/module/plugins/accounts/FshareVn.py index e75719082..0bbcb0ad2 100644 --- a/module/plugins/accounts/FshareVn.py +++ b/module/plugins/accounts/FshareVn.py @@ -18,7 +18,7 @@ class FshareVn(Account): ("stickell", "l.stickell@yahoo.it")] - VALID_UNTIL_PATTERN = ur'
Thời hạn dùng:
\s*
([^<]+)
' + VALID_UNTIL_PATTERN = ur'
Thời hạn dùng:
\s*
(.+?)
' LIFETIME_PATTERN = ur'
Lần đăng nhập trước:
\s*
.+?
' TRAFFIC_LEFT_PATTERN = ur'
Tổng Dung Lượng Tài Khoản
\s*([\d.]+) ([kKMG])B' DIRECT_DOWNLOAD_PATTERN = ur']*)[^>]*/>Kích hoạt download trực tiếp' diff --git a/module/plugins/accounts/HellshareCz.py b/module/plugins/accounts/HellshareCz.py index fa273eeeb..aef8232fd 100644 --- a/module/plugins/accounts/HellshareCz.py +++ b/module/plugins/accounts/HellshareCz.py @@ -59,7 +59,7 @@ class HellshareCz(Account): self.log_debug("Switch lang - URL: %s" % self.req.lastEffectiveURL) json = self.load("%s?do=locRouter-show" % self.req.lastEffectiveURL) - hash = re.search(r"(--[0-9a-f]+\-)", json).group(1) + hash = re.search(r'(--[0-9a-f]+\-)', json).group(1) self.log_debug("Switch lang - HASH: %s" % hash) diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py index a6b9ba3be..c68f703e5 100644 --- a/module/plugins/accounts/SmoozedCom.py +++ b/module/plugins/accounts/SmoozedCom.py @@ -59,7 +59,7 @@ class SmoozedCom(MultiAccount): 'hosters' : [hoster['name'] for hoster in status['data']['hoster']]} if info['validuntil'] < time.time(): - if float(status['data']['user'].get("user_trial", 0)) > time.time(): + if float(status['data']['user'].get('user_trial', 0)) > time.time(): info['premium'] = True else: info['premium'] = False diff --git a/module/plugins/accounts/TusfilesNet.py b/module/plugins/accounts/TusfilesNet.py index 21498b7b1..ef0e898f2 100644 --- a/module/plugins/accounts/TusfilesNet.py +++ b/module/plugins/accounts/TusfilesNet.py @@ -19,5 +19,5 @@ class TusfilesNet(XFSAccount): PLUGIN_DOMAIN = "tusfiles.net" - VALID_UNTIL_PATTERN = r'([^<]+)' + VALID_UNTIL_PATTERN = r'(.+?)' TRAFFIC_LEFT_PATTERN = r'\n (?P[\d.,]+)' -- cgit v1.2.3