diff options
Diffstat (limited to 'module/plugins/accounts/HighWayMe.py')
-rw-r--r-- | module/plugins/accounts/HighWayMe.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/module/plugins/accounts/HighWayMe.py b/module/plugins/accounts/HighWayMe.py index ff90ec2d2..3b39b7da6 100644 --- a/module/plugins/accounts/HighWayMe.py +++ b/module/plugins/accounts/HighWayMe.py @@ -7,15 +7,25 @@ from module.plugins.internal.Account import Account class HighWayMe(Account): __name__ = "HighWayMe.py" __type__ = "account" - __version__ = "0.04" + __version__ = "0.06" __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__ = """High-Way.me account plugin""" __license__ = "GPLv3" __authors__ = [("EvolutionClip", "evolutionclip@live.de")] - def parse_info(self, user, password, data, req): + def grab_hosters(self, user, password, data): + json_data = json_loads(self.load("https://high-way.me/api.php", + get={'hoster': 1})) + return [element['name'] for element in json_data['hoster']] + + + def grab_info(self, user, password, data): premium = False validuntil = -1 trafficleft = None @@ -40,11 +50,11 @@ class HighWayMe(Account): 'trafficleft': trafficleft} - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load("https://high-way.me/api.php?login", post={'login': '1', 'user': user, 'pass': password}) if 'UserOrPassInvalid' in html: - self.login_fail() + self.fail_login() |