我正在尝试通过python帖子请求更改我的Instagram简历,但不会更改。我没有任何错误,它只给我200响应代码,但我的简历保持不变。我在instagram.com上编辑自己的个人资料时复制了我发出的POST请求中的所有标头,但这根本不起作用。
import requests
url = "https://instagram.com/accounts/edit"
headers = {
"authority" : "instagram.com",
"accept" : "*/*",
"accept-encoding" : "gzip, deflate, be",
"accept-language" : "en-US,en;q=0.9,bs;q=0.8,de-DE;q=0.7,de;q=0.6,la;q=0.5",
"content-length" : "207",
"cookie" : "my-cookie",
"origin" : "https://www.instagram.com",
"referer" : "https://www.instagram.com/accounts/edit",
"sec-fetch.dest" : "empty",
"sec-fetch-mode" : "cors",
"sec-fetch-site" : "same-origin",
"user-agent" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/84.0.4147.105 Safari/537.36",
"x-csrftoken" : "my-token",
"x-ig-app-id" : "app-id",
"x-ig-www-claim" : "www-claim",
"x-instagram-ajax" : "x-ajax",
"x-requested-with" : "XMLHttpRequest",
}
body = {
"first_name" : "my-name.",
"email" : "my-email",
"username" : "my-username",
"phone_number" : "my-number",
"biography" : "Hello world!",
"external_url" : "",
"chaining_enabled" : "on"
}
response = requests.post(url, data=body, headers=headers)
print(response.status_code)