P
P
PtrGrd2022-04-16 13:29:38
Python
PtrGrd, 2022-04-16 13:29:38

How to pass requests session to selenium (Python)?

The bottom line: I have a requests library session where certain parameters are passed from a third-party library that only works through requests. I need the data from the requests session to go to selenium. That is, if requests sends a request to a site with such and such a header and from such and such an ip, then selenium should do the same. The data includes headers and a proxy server. What is the best way to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jack444, 2022-04-16
@Jack444

From the script on which the request is running, save the data to a file or to the database, and from another script with selenium, pull this data and use it. It is better, of course, to refactor the code and combine both scripts into one, if the scripts work on different PCs, then raise the server where the requests are and let Selenium access it or vice versa.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question