Is it possible to receive real-time information from Chrome in Python?

Asked

Viewed 149 times

-1

Hello. I wonder if there is how to get information from the proxy that is available by default in Google Chrome (the developer tools) to the point that I can use it in real time in Python without using Selenium Webdriver, for example.

Ex.: I make a request to google.com, my proxy receives HTTP200 and automatically my program receives the information I was able to connect to the site and printa on the terminal screen.

1 answer

2


There is no "proxy embedded" in Chrome. If you’re seeing a menu or proxy options in your Chrome developer tool interface, it’s because you have some proxy extension installed in your browser.

What Chrome has is just an API that allows extensions to set proxy settings -

So to do what you want, or have to use a proxy "normal", external - and program this proxy to print the desired settings, and configure Chrome (by the extension you already have, or in the operating system settings) to use this proxy - or create a proxy extension that requests a Python program from the localhost, and pass on the necessary information.

For option 1, a quick search reveals that there are some projects (such as https://github.com/luugiathuy/WebProxyPython ) which are simple proxys, written in Python, which you will be able to adapt to what you want to do.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.