summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/ShareRapidCom.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/ShareRapidCom.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/ShareRapidCom.py')
-rw-r--r--module/plugins/accounts/ShareRapidCom.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/module/plugins/accounts/ShareRapidCom.py b/module/plugins/accounts/ShareRapidCom.py
index 3aa67ffd1..a1cb40130 100644
--- a/module/plugins/accounts/ShareRapidCom.py
+++ b/module/plugins/accounts/ShareRapidCom.py
@@ -21,19 +21,19 @@ class ShareRapidCom(Account):
def loadAccountInfo(self, user, req):
src = req.load("http://megarapid.cz/mujucet/", decode=True)
- found = re.search(ur'<td>Max. počet paralelních stahování: </td><td>(\d+)', src)
- if found:
+ m = re.search(ur'<td>Max. počet paralelních stahování: </td><td>(\d+)', src)
+ if m:
data = self.getAccountData(user)
- data['options']['limitDL'] = [int(found.group(1))]
+ data['options']['limitDL'] = [int(m.group(1))]
- found = re.search(ur'<td>Paušální stahování aktivní. Vyprší </td><td><strong>(.*?)</strong>', src)
- if found:
- validuntil = mktime(strptime(found.group(1), "%d.%m.%Y - %H:%M"))
+ m = re.search(ur'<td>Paušální stahování aktivní. Vyprší </td><td><strong>(.*?)</strong>', src)
+ if m:
+ validuntil = mktime(strptime(m.group(1), "%d.%m.%Y - %H:%M"))
return {"premium": True, "trafficleft": -1, "validuntil": validuntil}
- found = re.search(r'<tr><td>Kredit</td><td>(.*?) GiB', src)
- if found:
- trafficleft = float(found.group(1)) * (1 << 20)
+ m = re.search(r'<tr><td>Kredit</td><td>(.*?) GiB', src)
+ if m:
+ trafficleft = float(m.group(1)) * (1 << 20)
return {"premium": True, "trafficleft": trafficleft, "validuntil": -1}
return {"premium": False, "trafficleft": None, "validuntil": None}