diff options
Diffstat (limited to 'pyload/plugin/account/AlldebridCom.py')
-rw-r--r-- | pyload/plugin/account/AlldebridCom.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pyload/plugin/account/AlldebridCom.py b/pyload/plugin/account/AlldebridCom.py index 7fc11e343..75ac430f1 100644 --- a/pyload/plugin/account/AlldebridCom.py +++ b/pyload/plugin/account/AlldebridCom.py @@ -1,10 +1,9 @@ # -*- coding: utf-8 -*- import re +import time import xml.dom.minidom as dom -from time import time - from BeautifulSoup import BeautifulSoup from pyload.plugin.Account import Account @@ -33,7 +32,7 @@ class AlldebridCom(Account): p = re.compile('\d+') exp_data = p.findall(time_text) - exp_time = time() + int(exp_data[0]) * 24 * 60 * 60 + int( + exp_time = time.time() + int(exp_data[0]) * 24 * 60 * 60 + int( exp_data[1]) * 60 * 60 + (int(exp_data[2]) - 1) * 60 #Get expiration date from API @@ -45,7 +44,7 @@ class AlldebridCom(Account): self.logDebug(html) xml = dom.parseString(html) - exp_time = time() + int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue) * 24 * 60 * 60 + exp_time = time.time() + int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue) * 24 * 60 * 60 account_info = {"validuntil": exp_time, "trafficleft": -1} return account_info |