diff --git a/run_service_backend.py b/run_service_backend.py index 8009c36..56758f7 100644 --- a/run_service_backend.py +++ b/run_service_backend.py @@ -114,7 +114,7 @@ def skland_sign_in_thread(): time.sleep(20) now = datetime.datetime.now() if now.strftime('%H:%M') == '08:00' and last_run != now.date(): - ark_back.skland_sign() + ark_back.skland_sign_new() last_run = now.date() except Exception as e: print(e, traceback.format_exc()) diff --git a/src/SKland_Auto_Sign/auto_sign.py b/src/SKland_Auto_Sign/auto_sign.py index 9f467b4..d398931 100644 --- a/src/SKland_Auto_Sign/auto_sign.py +++ b/src/SKland_Auto_Sign/auto_sign.py @@ -96,6 +96,11 @@ def get_grant_code(token): def get_cred(grant): + cred_code_url = 'https://zonai.skland.com/api/v1/user/auth/generate_cred_by_code' + resp = requests.post(cred_code_url, json={ + 'code': grant, + 'kind': 1 + }, headers=header_login) resp = requests.post(cred_code_url, json={ 'code': grant, 'kind': 1 @@ -147,7 +152,14 @@ def single_sign(cred_resp): def new_start(): result_list = [] - token_list = ['fqyRkfJrLlkuax8SzFffxc0W', 'i//Ozb2bFsXjxF9ZKgAgVi6K'] + token_list = [ + # 'fqyRkfJrLlkuax8SzFffxc0W', + 'i//Ozb2bFsXjxF9ZKgAgVi6K' + ] + token_dict = { + 'i//Ozb2bFsXjxF9ZKgAgVi6K': {'cred': 'ytheE5nQW7AU13UJfn3sq4hdvokojwGk', 'token': 'dbfa23414a942e7609ea4008eeeb7fb0', 'userId': '316019'}, + 'fqyRkfJrLlkuax8SzFffxc0W': {'cred': 'tn0EZDtUrSMu3tXh4wK2VJPionqQnMj4', 'token': 'dbfa23414a942e7609ea4008eeeb7fb0', 'userId': '131957'} + } for i in token_list: try: credit_dict = get_cred_by_token(i) @@ -157,5 +169,21 @@ def new_start(): print("签到完成!") +def new_start_neo(): + token_dict = { + 'i//Ozb2bFsXjxF9ZKgAgVi6K': {'cred': 'ytheE5nQW7AU13UJfn3sq4hdvokojwGk', + 'token': 'dbfa23414a942e7609ea4008eeeb7fb0', 'userId': '316019'}, + 'fqyRkfJrLlkuax8SzFffxc0W': {'cred': 'tn0EZDtUrSMu3tXh4wK2VJPionqQnMj4', + 'token': 'dbfa23414a942e7609ea4008eeeb7fb0', 'userId': '131957'} + } + for token, credit_dict in token_dict.items(): + try: + msg, code = single_sign(credit_dict) + print(f'{msg}: {code}') + except Exception as ex: + print(f'签到失败,原因:{str(ex)}') + print("签到完成!") + + if __name__ == '__main__': - new_start() + new_start_neo() diff --git a/src/ark_helper_backend/backend.py b/src/ark_helper_backend/backend.py index fdf5f91..1f67212 100644 --- a/src/ark_helper_backend/backend.py +++ b/src/ark_helper_backend/backend.py @@ -146,6 +146,20 @@ class ArkHelperBackend: except Exception as ex: self.logger.error(f'签到失败,原因:{str(ex)}') + def skland_sign_new(self): + token_dict = { + 'i//Ozb2bFsXjxF9ZKgAgVi6K': {'cred': 'ytheE5nQW7AU13UJfn3sq4hdvokojwGk', + 'token': 'dbfa23414a942e7609ea4008eeeb7fb0', 'userId': '316019'}, + 'fqyRkfJrLlkuax8SzFffxc0W': {'cred': 'tn0EZDtUrSMu3tXh4wK2VJPionqQnMj4', + 'token': 'dbfa23414a942e7609ea4008eeeb7fb0', 'userId': '131957'} + } + for token, credit_dict in token_dict.items(): + try: + msg, code = single_sign(credit_dict) + self.logger.info(f'{msg}: {code}') + except Exception as ex: + self.logger.error(f'签到失败,原因:{str(ex)}') + def update_gacha_data(self): for phone in self.user_data_dict: gacha_history_data = self.user_data_dict[phone]['gacha'] diff --git a/src/util/check_connection.py b/src/util/check_connection.py new file mode 100644 index 0000000..1f77003 --- /dev/null +++ b/src/util/check_connection.py @@ -0,0 +1,7 @@ +import requests + +url = 'http://192.168.195.103:61000/GetFieldData' +r = requests.post(url, { + "field_name": "supported_llm" +}, timeout=10) +print(r.text) \ No newline at end of file