T
T
TABSEK2021-12-03 22:05:14
Python
TABSEK, 2021-12-03 22:05:14

How to collect cookies with selenium and pass to request in Python?

Good day!
We need to collect cookies using selenium and then pass them to request.
Please tell me how can this be done

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TABSEK, 2021-12-04
@TABSEK

cookies = driver.get_cookies()
session = requests.Session()
for cookie in cookies:
(session.cookies.set(cookie['name'], cookie['value']))
Here is the answer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question