Я пытаюсь создать запросчик друзей Roblox для Python, но это не полностью работает для запроса API друзей Roblox. >
Код: Выделить всё
import requests
rcookie = "Example Cookie" # Security COOKIE
Target_ID = 1 # Roblox
x_csrf_res = requests.post(
url = "https://groups.roblox.com/v1/groups/1/users",
cookies = {
".ROBLOSECURITY": rcookie
}
)
if x_csrf_res.headers.get("x-csrf-token"):
csrf = x_csrf_res.headers.get("x-csrf-token")
test_res = requests.post(
url = f"https://friends.roblox.com/v1/users/{Target_ID}/request-friendship",
data = {
"friendshipOriginSourceType": 0
},
headers = {
"X-Csrf-Token": csrf
},
cookies = {
".ROBLOSECURITY": rcookie
}
)
if test_res.status_code == 200:
print("Send Friend!")
print(test_res.text)
else:
print("Error!")
print(test_res.status_code)
print(test_res.text)
else:
print(f"Invalid Cookie! {x_csrf_res.status_code} {x_csrf_res.text}")
Это подтверждающее фото.

Код: Выделить всё
{
"success": true,
"notificationMuted": true
}
Код: Выделить всё
{
"success": true,
"isCaptchaRequired": false
}
Как я могу решить эту проблему?
Мой код был сломан после изменения API друзей Roblox.
Подробнее здесь: https://stackoverflow.com/questions/790 ... nd-request