使用python来修改ACGO账号设置
2025-07-23 18:41:05
发布于:浙江
使用python来修改ACGO账号设置
类似于 API
目测可以改成 空号(空昵称)。
或者更多.......( 头像,签名,性别,生日(世界戳)等 )
实现: python-requests库
需要: 环境,以及 Access-Token
import requests
header = {
"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
"Access-Token":"",
"Content-Type": "application/json"
}
data = {
"avatar":"https://attach.acgo.cn/picture/default.png",
"nickName":"", #改成空格为空号
"name":"", #姓名
"sex":"0", # 男1 女2 无性别0
"birthday":"0", # 0是无
"grade":"", #年级
"schoolId":0,
"autograph":""
}
url_1 = "https://gateway.acgo.cn/acgoAccount/openapi/user/modifyProfile"
class Client:
def __init__(self):
pass
def send(self):
response = requests.post(url_1, json=data, headers=header)
if response.status_code==200:
response_json = response.json()
print(f"status_code:{response_json['code']}\tmessage:{response_json['message']}\ndata:{response_json['data']}\ttimestamp:{response_json['timestamp']}")
if response_json['message']=="登录信息缺失,请重新登录":
print("你需要填写Access-Token以继续。")
if response_json['message']=="success":
print("修改成功")
def test_send(self):
print(f"{requests.options(url_1,headers=header).status_code} (200 is OK)")
if __name__ == "__main__":
Client().test_send()
Client().send()
在header下填写自己的Access token。
在data下填写自己的数据。
其他,自己可以修改代码达成其他效果。
由使用者承担修改后带来的损失
由使用者承担修改后带来的损失
由使用者承担修改后带来的损失
仅供学习交流使用。
这里空空如也
有帮助,赞一个