import requests
payload = {
"username": "user",
"password": "password"
}
url = "https://lichess.org/login"
r = requests.post(url=url, data=payload)
a = r.content
if not a == b'Cross origin request forbidden':
print("Операция прошла успешно")
else:
print("Ошибка")