Код: Выделить всё
def _get_session_id(self) -> str:
return self._session.cookies.get_dict()['sessionid']
def accept_friend_invite(self, targetId: str) -> str:
session_id = self._get_session_id()
accept_url = f'https://steamcommunity.com/actions/AddFriendAjax'
print(session_id)
response = self._session.post(accept_url, data=f"sessionID={session_id}&steamid={targetId}&accept_invite=0")
return f"{response.text}\n\n{response.status_code}"
Я пытался использовать https://reqbin.com/
Код: Выделить всё
POST /actions/AddFriendAjax HTTP/1.1
Host: steamcommunity.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 78
sessionID=#####&steamid=#######&accept_invite=0
Мне нужно принять/отправить запрос на добавление в друзья.
Подробнее здесь: https://stackoverflow.com/questions/786 ... eam-python