Hello I am using gtts speech recognition and get audio to create a voice assistant like Alexa (this is why I named her Alex) and I am working on searching the web using the webbrowser module. Here it opens a website that says the weather in my location. Does anyone know how I can close this tab using python after a while? If it is any help I am using raspberry pi duckduckgo and chromium. Thank you.
while True:
if get_audio() == 'hey Alex':
search = get_audio()
if search == 'what is the weather':
dest='https://weather.com/en-GB/weather/today/l/f71eff26206918c09bd0cf032da3d10774f5f10b16a35a30d41e258cc2397c8e'
web.get(path).open(dest)
if get_audio() == 'thank you Alex':
text_to_read = 'no problem'
reading_from_string()