diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-08-01 19:35:59 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-08-01 19:35:59 +0200 |
commit | ba916633f2bedb04c7358000b91aed69f52e8e43 (patch) | |
tree | 5b0e323417bf2ac9f3d88b4234c7e8da98d30f5c /module/plugins/accounts/AlldebridCom.py | |
parent | [DepositfilesCom] Fix missing declaration (thx hmlinaric) (diff) | |
download | pyload-ba916633f2bedb04c7358000b91aed69f52e8e43.tar.xz |
Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics
Diffstat (limited to 'module/plugins/accounts/AlldebridCom.py')
-rw-r--r-- | module/plugins/accounts/AlldebridCom.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py index 122d23447..dbf4ad800 100644 --- a/module/plugins/accounts/AlldebridCom.py +++ b/module/plugins/accounts/AlldebridCom.py @@ -1,18 +1,20 @@ # -*- coding: utf-8 -*- +import re import xml.dom.minidom as dom + from time import time -import re -import urllib +from urllib import urlencode -from module.plugins.Account import Account from BeautifulSoup import BeautifulSoup +from module.plugins.Account import Account + class AlldebridCom(Account): __name__ = "AlldebridCom" - __version__ = "0.22" __type__ = "account" + __version__ = "0.22" __description__ = """AllDebrid.com account plugin""" __author_name__ = "Andy Voigt" @@ -23,7 +25,7 @@ class AlldebridCom(Account): data = self.getAccountData(user) page = req.load("http://www.alldebrid.com/account/") soup = BeautifulSoup(page) - #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) @@ -43,7 +45,7 @@ class AlldebridCom(Account): return account_info def login(self, user, data, req): - urlparams = urllib.urlencode({'action': 'login', 'login_login': user, 'login_password': data['password']}) + urlparams = urlencode({'action': 'login', 'login_login': user, 'login_password': data['password']}) page = req.load("http://www.alldebrid.com/register/?%s" % urlparams) if "This login doesn't exist" in page: |