|
```python
import requests
url_login = "https://demo.fuclaude.com/login_token?state="
url_api = "https://demo.fuclaude.com/api/bootstrap"
headers = {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"
}
def check_session(session_key):
session = requests.Session()
data = {"action": "token", "session_key": session_key}
session.post(url=url_login, data=data, headers=headers)
response = session.get(url=url_api, headers=headers)
account_dict = response.json().get("account", {})
if account_dict:
print(f"{session_key} is alive, email is: {account_dict.get('email_address', '')}")
else:
print(f"{session_key} is dead")
session.close()
sk_list = """
sk-ant-sid01-xxx
sk-ant-sid01-xxx
""".strip().split("\n")
for sk in sk_list:
check_session(sk)
```
之前在Fuclaude注册了多个账号,最近有些过期了,一个个登录检测太麻烦。于是写了个脚本批量检测账号状态,发现失效的账号重新登录后居然都恢复了,Fuclaude真牛! |
|