Advertisement
skip420

GoogleSearch

Sep 4th, 2022
1,131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. # python3 GoogleSearch.py
  2. # Using Firfox or its default browser
  3.  
  4. from googlesearch import *
  5. import webbrowser
  6. #to search, will ask search query at the time of execution
  7. query = input("Input your query:")
  8.  
  9. chrome_path = r'/usr/bin/chromium-browser'
  10. for url in search(query, tld="com", num=1, stop = 1, pause = 2):
  11.  webbrowser.open("https://google.com/search?q=%s" % query)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement