[Solved] How to browse using python? [closed]


You can do that using Selenium and automate google search
first install selenium in your idle or pycharm
Selenium

pip install selenium  

install

Chromedriver

Download the chrome browser from here (choose the version for your system)
After downloading, extract it and then copy the file in the folder of the script.

from selenium import webdriver 

# Taking input from user 
search_string = input("Input the URL or string you want to search for:") 

# This is done to structure the string  
search_string = search_string.replace(' ', '+') 

# Assigning the browser variable with chromedriver of Chrome.
browser = webdriver.Chrome('chromedriver') 

for i in range(1): 
    matched_elements = browser.get("https://www.google.com/search?q=" +
                                    search_string + "&start=" + str(i)) 

solved How to browse using python? [closed]