Created
June 12, 2021 13:28
-
-
Save KaushikShresth07/509cc0f37820e24319fcf03a3aa6466f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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