Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I read a web content without selenium with python?

I’m trying to read if an element of a web page changes when I input some string of numbers in an input box. Is there a way to know the response of the web without having to open the web page in a tab with selenium? I am trying to check millions of inputs so it would be better to not have to open the tab and input each combination in the simulated selenium browser. Thanks.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

you can try using the –headless option that does not open a tab.

An example could be:

from selenium import webdriver 
from selenium.webdriver.chrome.options import Options
chrome_options = Options()

chrome_options.add_argument("--headless")
browser = webdriver.Chrome(options=chrome_options)

browser.get("https://example.com")

print(browser.page_source)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading