Skip to content

Instantly share code, notes, and snippets.

@KaushikShresth07
Created June 12, 2021 13:28
Show Gist options
  • Save KaushikShresth07/509cc0f37820e24319fcf03a3aa6466f to your computer and use it in GitHub Desktop.
Save KaushikShresth07/509cc0f37820e24319fcf03a3aa6466f to your computer and use it in GitHub Desktop.
import pywhatkit
import wikipedia
from pywikihow import search_wikihow
def GoogleSearch(term):
Query = str(term)
pywhatkit.search(Query)
if 'how to' in Query:
max_result = 1
how_to_func = search_wikihow(query=Query,max_results=max_result)
assert len(how_to_func) == 1
how_to_func[0].print()
return how_to_func[0].summary
else:
search = wikipedia.summary(Query,2)
return f": According To Your Search : {search}"
def SimpleGoogleSearch(Title):
pywhatkit.search(Title)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment