diff options
Diffstat (limited to 'module/plugins/accounts/RehostTo.py')
-rw-r--r-- | module/plugins/accounts/RehostTo.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py index 50b64bff8..a9f2746c2 100644 --- a/module/plugins/accounts/RehostTo.py +++ b/module/plugins/accounts/RehostTo.py @@ -6,15 +6,26 @@ from module.plugins.internal.Account import Account class RehostTo(Account): __name__ = "RehostTo" __type__ = "account" - __version__ = "0.19" + __version__ = "0.20" __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__ = """Rehost.to account plugin""" __license__ = "GPLv3" __authors__ = [("RaNaN", "RaNaN@pyload.org")] - def grab_info(self, user, password, data, req): + def grab_hosters(self, user, password, data): + html = self.load("http://rehost.to/api.php", + get={'cmd' : "get_supported_och_dl", + 'long_ses': data['session']}) + return [x.strip() for x in html.replace("\"", "").split(",")] + + + def grab_info(self, user, password, data): premium = False trafficleft = None validuntil = -1 @@ -47,7 +58,7 @@ class RehostTo(Account): 'session' : session} - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load("https://rehost.to/api.php", get={'cmd': "login", 'user': user, |