summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/CzshareCom.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/CzshareCom.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/CzshareCom.py')
-rw-r--r--module/plugins/accounts/CzshareCom.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/accounts/CzshareCom.py b/module/plugins/accounts/CzshareCom.py
index 3b1989591..912b9328b 100644
--- a/module/plugins/accounts/CzshareCom.py
+++ b/module/plugins/accounts/CzshareCom.py
@@ -36,13 +36,13 @@ class CzshareCom(Account):
def loadAccountInfo(self, user, req):
html = req.load("http://sdilej.cz/prehled_kreditu/")
- found = re.search(self.CREDIT_LEFT_PATTERN, html)
- if found is None:
+ m = re.search(self.CREDIT_LEFT_PATTERN, html)
+ if m is None:
return {"validuntil": 0, "trafficleft": 0}
else:
- credits = float(found.group(1).replace(' ', '').replace(',', '.'))
- credits = credits * 1024 ** {'KiB': 0, 'MiB': 1, 'GiB': 2}[found.group(2)]
- validuntil = mktime(strptime(found.group(3), '%d.%m.%y %H:%M'))
+ credits = float(m.group(1).replace(' ', '').replace(',', '.'))
+ credits = credits * 1024 ** {'KiB': 0, 'MiB': 1, 'GiB': 2}[m.group(2)]
+ validuntil = mktime(strptime(m.group(3), '%d.%m.%y %H:%M'))
return {"validuntil": validuntil, "trafficleft": credits}
def login(self, user, data, req):