summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/UploadedTo.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-12 18:07:20 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-12 18:07:20 +0200
commitf570bef8707ccb15aa859ac06faf2fe5b652fb70 (patch)
treec94f274809369ccb06c92c0e6a16279477ec0e6f /module/plugins/accounts/UploadedTo.py
parentfixes just_header (diff)
downloadpyload-f570bef8707ccb15aa859ac06faf2fe5b652fb70.tar.xz
ul fix
Diffstat (limited to 'module/plugins/accounts/UploadedTo.py')
-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}