diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-07-20 03:02:09 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-07-20 03:34:54 +0200 |
commit | 9395182da7afed55a29bde1c7cbefe4204e783f0 (patch) | |
tree | 14c5f5f2dc5ea428c4625e8ce9208c5d77d1fc18 /module/plugins/accounts/FshareVn.py | |
parent | [account] self.html -> html (where was possible) (diff) | |
download | pyload-9395182da7afed55a29bde1c7cbefe4204e783f0.tar.xz |
Store all re.search/match object as "m" instead "found"
Diffstat (limited to 'module/plugins/accounts/FshareVn.py')
-rw-r--r-- | module/plugins/accounts/FshareVn.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/accounts/FshareVn.py b/module/plugins/accounts/FshareVn.py index 3996322ad..5726ad410 100644 --- a/module/plugins/accounts/FshareVn.py +++ b/module/plugins/accounts/FshareVn.py @@ -45,10 +45,10 @@ class FshareVn(Account): trafficleft = self.getTrafficLeft() return {"validuntil": -1, "trafficleft": trafficleft, "premium": True} - found = re.search(self.VALID_UNTIL_PATTERN, html) - if found: + m = re.search(self.VALID_UNTIL_PATTERN, html) + if m: premium = True - validuntil = mktime(strptime(found.group(1), '%I:%M:%S %p %d-%m-%Y')) + validuntil = mktime(strptime(m.group(1), '%I:%M:%S %p %d-%m-%Y')) trafficleft = self.getTrafficLeft() else: premium = False @@ -70,5 +70,5 @@ class FshareVn(Account): self.wrongPassword() def getTrafficLeft(self): - found = re.search(self.TRAFFIC_LEFT_PATTERN, html) - return float(found.group(1)) * 1024 ** {'k': 0, 'K': 0, 'M': 1, 'G': 2}[found.group(2)] if found else 0 + m = re.search(self.TRAFFIC_LEFT_PATTERN, html) + return float(m.group(1)) * 1024 ** {'k': 0, 'K': 0, 'M': 1, 'G': 2}[m.group(2)] if m else 0 |