diff options
Diffstat (limited to 'module/plugins/accounts/NoPremiumPl.py')
-rw-r--r-- | module/plugins/accounts/NoPremiumPl.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/module/plugins/accounts/NoPremiumPl.py b/module/plugins/accounts/NoPremiumPl.py index f8236c978..2619317fb 100644 --- a/module/plugins/accounts/NoPremiumPl.py +++ b/module/plugins/accounts/NoPremiumPl.py @@ -4,12 +4,11 @@ import datetime import hashlib import time -from module.common.json_layer import json_loads -from module.plugins.internal.Account import Account -# from module.plugins.internal.MultiAccount import MultiAccount +from module.plugins.internal.utils import json +from module.plugins.internal.MultiAccount import MultiAccount -class NoPremiumPl(Account): +class NoPremiumPl(MultiAccount): __name__ = "NoPremiumPl" __type__ = "account" __version__ = "0.06" @@ -33,7 +32,7 @@ class NoPremiumPl(Account): 'info' : "1" } def grab_hosters(self, user, password, data): - hostings = json_loads(self.load("https://www.nopremium.pl/clipboard.php?json=3").strip()) + hostings = json.loads(self.load("https://www.nopremium.pl/clipboard.php?json=3").strip()) hostings_domains = [domain for row in hostings for domain in row['domains'] if row['sdownload'] == "0"] self.log_debug(hostings_domains) @@ -43,7 +42,7 @@ class NoPremiumPl(Account): def grab_info(self, user, password, data): try: - result = json_loads(self.run_auth_query()) + result = json.loads(self.run_auth_query()) except Exception: #@TODO: return or let it be thrown? @@ -68,7 +67,7 @@ class NoPremiumPl(Account): data['pwd'] = hashlib.sha1(hashlib.md5(password).hexdigest()).hexdigest() try: - response = json_loads(self.run_auth_query()) + response = json.loads(self.run_auth_query()) except Exception: self.fail_login() |