def search_engine (self, search_input=""):
try:
client = wolframalpha.Client(
app_id="23XUAT-H2875HHEEX") # this is the client App id specification for the PYSHA
results = client.query(search_input) # this searchs the input from the client side
answer = next(
results.results).text # this gets the String Answered from the Search Engine . so that the answer spoken out by Pysha
print(answer)
return answer
except:
try:
results = wikipedia.summary(search_input,
sentences=2) # this searches for the wikipedia summary input and then parse the input
print(results)
return results
except:
webbrowser.open(search_input) # this will open the web browser
return
评论列表
文章目录