Option to search on google.
This commit is contained in:
16
main.py
16
main.py
@@ -56,22 +56,26 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
if 'play' in command:
|
if 'play' in command:
|
||||||
song = command.replace('play', '')
|
song = command.replace('play', '')
|
||||||
talk('playing ' + song)
|
talk('playing ' + song + 'opening web browser')
|
||||||
pywhatkit.playonyt(song)
|
pywhatkit.playonyt(song)
|
||||||
elif 'time' in command:
|
elif 'time' in command:
|
||||||
time = datetime.datetime.now().strftime('%I:%M %p')
|
time = datetime.datetime.now().strftime('%I:%M %p')
|
||||||
talk('Current time is ' + time)
|
talk('Current time is ' + time)
|
||||||
elif 'search' in command:
|
elif 'search on wikipedia' in command:
|
||||||
wiki = command.replace('wiki', '')
|
search = command.replace('search on wikipedia', '')
|
||||||
info = wikipedia.summary(wiki, 6)
|
info = wikipedia.summary(search, 6)
|
||||||
print(info)
|
print('Searching ' + info)
|
||||||
talk(info)
|
talk(info)
|
||||||
|
elif 'search on google' in command:
|
||||||
|
searchg = command.replace('search on google', '')
|
||||||
|
pywhatkit.search(searchg)
|
||||||
|
talk('Searching' + searchg + 'opening web browser')
|
||||||
elif 'date' in command:
|
elif 'date' in command:
|
||||||
talk('sorry, I have a headache')
|
talk('sorry, I have a headache')
|
||||||
elif 'are you single' in command:
|
elif 'are you single' in command:
|
||||||
talk('I am in a relationship with PSMForums')
|
talk('I am in a relationship with PSMForums')
|
||||||
elif 'joke' in command:
|
elif 'joke' in command:
|
||||||
talk('Let me get you laughing')
|
talk('Let me get you laughing...')
|
||||||
talk(pyjokes.get_joke())
|
talk(pyjokes.get_joke())
|
||||||
elif 'weather' in command:
|
elif 'weather' in command:
|
||||||
command = command.replace('weather', '')
|
command = command.replace('weather', '')
|
||||||
|
|||||||
Reference in New Issue
Block a user