打开开发者模式, 在控制台粘贴代码
const body = {
user_info: {
bui_user: {
screan_name: "hotdogc1017",
user_id: "4435896002686637",
// 这里的图片路径是上面修狗在本文的图片路径。
// 如果只想修改头像,仅保留此项即可(不知道其他项删除有何影响
avatar_url: "https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/24d0e1ecae564c5a8ab8be7a56e4b531~tplv-k3u1fbpfcp-jj-mark:3024:0:0:0:q75.awebp#?w=240&h=240&s=314919&e=gif&f=27&b=ceb193"
},
profile: {
tag_ids: ["7267750693225316396"],
user_id: "4435896002686637",
work_direction: "后端开发",
work_start_time: 1638316800
},
}
}
// 这里更换为你的修改资料页面中,浏览器导航栏里的url
const data = await fetch("https://api.juejin.cn/user_api/v1/user/update_profile?aid=2608&uuid=7261807587971647033&spider=0", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
credentials: "include",
body: JSON.stringify(body),
}).then((res) => res.json())
console.log(data);