From 97d25752691aa561c29a91166fdd30302bef2db2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 21 Sep 2015 00:54:03 +0200 Subject: [Account] parse_info -> grab_info --- module/plugins/accounts/AlldebridCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/AlldebridCom.py') diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py index 6a2f09c9c..a468b5b99 100644 --- a/module/plugins/accounts/AlldebridCom.py +++ b/module/plugins/accounts/AlldebridCom.py @@ -20,7 +20,7 @@ class AlldebridCom(Account): __authors__ = [("Andy Voigt", "spamsales@online.de")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): data = self.get_data(user) html = self.load("http://www.alldebrid.com/account/") soup = BeautifulSoup.BeautifulSoup(html) @@ -63,4 +63,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.login_fail() + self.fail_login() -- cgit v1.2.3 From fb45ec44220201268f99b747831df717fa7a83f8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 21 Sep 2015 16:31:48 +0200 Subject: [Account] Fix __version__ --- module/plugins/accounts/AlldebridCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/AlldebridCom.py') diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py index a468b5b99..845c1b835 100644 --- a/module/plugins/accounts/AlldebridCom.py +++ b/module/plugins/accounts/AlldebridCom.py @@ -12,7 +12,7 @@ from module.plugins.internal.Account import Account class AlldebridCom(Account): __name__ = "AlldebridCom" __type__ = "account" - __version__ = "0.26" + __version__ = "0.27" __status__ = "testing" __description__ = """AllDebrid.com account plugin""" -- cgit v1.2.3 From ec6e5dc7fcdcefee10e37d22473c9accae1104cf Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 29 Sep 2015 20:05:07 +0200 Subject: Account class completely rewritten + plugins updated --- module/plugins/accounts/AlldebridCom.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'module/plugins/accounts/AlldebridCom.py') diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py index 845c1b835..357dd5380 100644 --- a/module/plugins/accounts/AlldebridCom.py +++ b/module/plugins/accounts/AlldebridCom.py @@ -12,7 +12,7 @@ from module.plugins.internal.Account import Account class AlldebridCom(Account): __name__ = "AlldebridCom" __type__ = "account" - __version__ = "0.27" + __version__ = "0.28" __status__ = "testing" __description__ = """AllDebrid.com account plugin""" @@ -20,8 +20,13 @@ class AlldebridCom(Account): __authors__ = [("Andy Voigt", "spamsales@online.de")] - def grab_info(self, user, password, data, req): - data = self.get_data(user) + def grab_hosters(self, user, password, data): + html = self.load("https://www.alldebrid.com/api.php", + get={'action': "get_host"}).replace("\"", "").strip() + return [x.strip() for x in html.split(",") if x.strip()] + + + def grab_info(self, user, password, data): html = self.load("http://www.alldebrid.com/account/") soup = BeautifulSoup.BeautifulSoup(html) @@ -38,7 +43,6 @@ class AlldebridCom(Account): #: Get expiration date from API except Exception: - data = self.get_data(user) html = self.load("https://www.alldebrid.com/api.php", get={'action': "info_user", 'login' : user, @@ -54,7 +58,7 @@ class AlldebridCom(Account): 'premium' : True } - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load("https://www.alldebrid.com/register/", get={'action' : "login", 'login_login' : user, -- cgit v1.2.3 From 3b3a4bd889286777ba6a590a1f74cf3edae36a72 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 30 Sep 2015 00:30:53 +0200 Subject: Add __config__ to MultiAccount (and XFSAccount) based plugins --- module/plugins/accounts/AlldebridCom.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'module/plugins/accounts/AlldebridCom.py') diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py index 357dd5380..32113c890 100644 --- a/module/plugins/accounts/AlldebridCom.py +++ b/module/plugins/accounts/AlldebridCom.py @@ -15,6 +15,10 @@ class AlldebridCom(Account): __version__ = "0.28" __status__ = "testing" + __config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"), + ("mh_list" , "str" , "Hoster list (comma separated)", "" ), + ("mh_interval", "int" , "Reload interval in minutes" , 60 )] + __description__ = """AllDebrid.com account plugin""" __license__ = "GPLv3" __authors__ = [("Andy Voigt", "spamsales@online.de")] -- cgit v1.2.3 From 25d5726d4953b93a2e286fd6af8d4ead20670ba6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 1 Oct 2015 04:55:17 +0200 Subject: A lot of plugin code cosmetics --- module/plugins/accounts/AlldebridCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/AlldebridCom.py') diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py index 32113c890..12d0582a8 100644 --- a/module/plugins/accounts/AlldebridCom.py +++ b/module/plugins/accounts/AlldebridCom.py @@ -26,8 +26,8 @@ class AlldebridCom(Account): def grab_hosters(self, user, password, data): html = self.load("https://www.alldebrid.com/api.php", - get={'action': "get_host"}).replace("\"", "").strip() - return [x.strip() for x in html.split(",") if x.strip()] + get={'action': "get_host"}) + return [x for x in map(str.strip, html.replace("\"", "").split(",")) if x] def grab_info(self, user, password, data): -- cgit v1.2.3