summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r--module/plugins/accounts/UploadedTo.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py
index 6852e5243..0bc7c2fd0 100644
--- a/module/plugins/accounts/UploadedTo.py
+++ b/module/plugins/accounts/UploadedTo.py
@@ -37,17 +37,18 @@ class UploadedTo(Account):
premium = '<a href="me#premium"><em>Premium</em>' in html or '<em>Premium</em></th>' in html
if premium:
- #raw_traffic = re.search(r'<th colspan="2"><b class="cB">([^<]+)', html).group(1)
+ raw_traffic = re.search(r'<th colspan="2"><b class="cB">([^<]+)', html).group(1)
raw_valid = re.search(r"<td>Duration:</td>\s*<th>([^<]+)", html, re.MULTILINE).group(1).strip()
+ traffic = int(self.parseTraffic(raw_traffic))
+
if raw_valid == "unlimited":
validuntil = -1
else:
raw_valid = re.findall(r"\d+", raw_valid)
validuntil = time() + 24 * 60 * 60 * int(raw_valid[0]) + 60 * 60 * int(raw_valid[1])
-
- return {"validuntil":validuntil, "trafficleft": -1}
+ return {"validuntil":validuntil, "trafficleft":traffic, "maxtraffic":50*1024*1024}
else:
return {"premium" : False, "validuntil" : -1}