L
L
Lucker_Kophe2021-06-09 11:53:19
Parsing
Lucker_Kophe, 2021-06-09 11:53:19

Python. How to copy cookies from the browser?

Good afternoon. I want to copy cookies from the browser for further use of the requests library. Found the browser_cookie module, with the code:

import browsercookie

cj = browsercookie.chrome()

session = requests.Session()
goToLog = session.post(url_form, headers=header, cookies=cj)


but using it resulted in an error - "browsercookie.BrowserCookieError: win32crypt must be available to decrypt Chrome cookie on Windows". Can you please tell me if there is any solution to this error or do I need to use another module?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
Uno, 2021-06-15
@Noizefan

There is a solution. Translate errors into Russian and delve into them.

browsercookie.BrowserCookieError: win32crypt must be available to decrypt Chrome cookies on Windows

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question