summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/AlldebridCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/accounts/AlldebridCom.py')
-rw-r--r--module/plugins/accounts/AlldebridCom.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py
index a109faf4f..eb58da928 100644
--- a/module/plugins/accounts/AlldebridCom.py
+++ b/module/plugins/accounts/AlldebridCom.py
@@ -12,36 +12,36 @@ from module.plugins.internal.Account import Account
class AlldebridCom(Account):
__name__ = "AlldebridCom"
__type__ = "account"
- __version__ = "0.25"
+ __version__ = "0.26"
__description__ = """AllDebrid.com account plugin"""
__license__ = "GPLv3"
__authors__ = [("Andy Voigt", "spamsales@online.de")]
- def loadAccountInfo(self, user, req):
- data = self.getAccountData(user)
+ def load_account_info(self, user, req):
+ data = self.get_account_data(user)
html = self.load("http://www.alldebrid.com/account/", req=req)
soup = BeautifulSoup(html)
- #Try to parse expiration date directly from the control panel page (better accuracy)
+ # Try to parse expiration date directly from the control panel page (better accuracy)
try:
time_text = soup.find('div', attrs={'class': 'remaining_time_text'}).strong.string
- self.logDebug("Account expires in: %s" % time_text)
+ self.log_debug("Account expires in: %s" % time_text)
p = re.compile('\d+')
exp_data = p.findall(time_text)
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
+ # Get expiration date from API
except Exception:
- data = self.getAccountData(user)
+ data = self.get_account_data(user)
html = self.load("https://www.alldebrid.com/api.php",
get={'action': "info_user", 'login': user, 'pw': data['password']}, req=req)
- self.logDebug(html)
+ self.log_debug(html)
xml = dom.parseString(html)
exp_time = time.time() + int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue) * 24 * 60 * 60
@@ -60,4 +60,4 @@ class AlldebridCom(Account):
if "This login doesn't exist" in html \
or "The password is not valid" in html \
or "Invalid captcha" in html:
- self.wrongPassword()
+ self.wrong_password()