summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/FshareVn.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-20 03:02:09 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-20 03:34:54 +0200
commit9395182da7afed55a29bde1c7cbefe4204e783f0 (patch)
tree14c5f5f2dc5ea428c4625e8ce9208c5d77d1fc18 /module/plugins/accounts/FshareVn.py
parent[account] self.html -> html (where was possible) (diff)
downloadpyload-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.py10
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