L
L
LordOftheCode2021-09-30 19:45:34
Python
LordOftheCode, 2021-09-30 19:45:34

How can I login to the site with cookies on requests?

I tried to enter the site lolz.guru (not advertising) by cookies, I tried all the methods,
my code did not work

cookies = httpx.Cookies()
cookies.set('xf_user', '4526016%2C15069c93c6745fd3', domain='lolz.guru')
cookies.set('xf_tfa_trust', 'XgK-VpazJFI642F95Hd', domain='lolz.guru')
 
data = {
    'message_html' : '<p>test</p>',
    '_xfRelativeResolver' : 'https://lolz.guru/m6016/',
    '_xfToken': '4526016,1632988468,eec7b7ee5cc6d95c7ef34',
    '_xfRequestUri' : '/members/45/',
    '_xfNoRedirect' : '1',
    '_xfToken' : '4526016,16329842e1769c7b7ee5cc6d95c7ef34',
    '_xfResponseType' : 'json',
}
 
r = ses.post("https://lolz.guru/members/4526016/post", cookies=cookies, data=data)


through the request I check whether I am logged into my account or not

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question