Compare commits

..

1 Commits

Author SHA1 Message Date
4a57af20e7 更新 福田.js
修复多账号
2025-04-14 16:52:10 +08:00
2 changed files with 309 additions and 335 deletions

View File

@ -55,35 +55,9 @@ class SignKit:
def get_current_ip():
# 定义API列表主备分离
ip_apis = [
'https://myip.ipip.net/json', # 主API
# 'https://api.ipify.org?format=json', # 备用API1证据9
# 'https://api64.ipify.org?format=json', # 备用API2证据5,8
'https://qifu-api.baidubce.com/ip/local/geo/v1/district',
'https://r.inews.qq.com/api/ip2city',
# 'https://ipapi.co/json'
]
for api_url in ip_apis:
try:
response = requests.get(api_url, timeout=5) # 增加超时控制证据9
response.raise_for_status() # 检查HTTP状态码证据9
# 打印当前使用api
print(f"使用API: {api_url}")
# 统一处理不同API的响应格式
if 'ipip.net' in api_url:
return response.json()['data']['ip'] # 原API格式
else:
return response.json()['ip'] # 备用API格式证据5,8,9
except requests.exceptions.RequestException as e: # 捕获所有请求异常证据1,9
error_type = type(e).__name__
print(f"API {api_url} 请求失败: [{error_type}] {str(e)}")
# 所有API均失败时处理
print("所有IP API均不可用请检查网络连接")
return None # 明确返回None证据9
response = requests.get('https://myip.ipip.net/json')
data = response.json()
return data['data']['ip']
def update_juliang_white_list(ip, JULIANG_KEY, JULIANG_TRADE_NO):

612
福田.js

File diff suppressed because one or more lines are too long