I am trying to create a voice assistant written in python. For voice assistants like Alexa or Google's voice assistant, when you ask "tell me the latest news" the app starts playing an audio file of the news. I found a similar type of file on the BBC's website (https://www.bbc.co.uk/news/av/10318236/headlines-from-bbc-news). I am trying to recreate this using python. I only see 2 options - one being to manipulate the BBC websites code and get the audio to play in python (without downloading an audio file) or the second being to open the BBC link above in an external browser (which I already know how to do) but have it so that the player plays as soon as the page opens.
Code to open website:
reg_ex = re.search('open website (.+)', command)
if reg_ex:
domain = reg_ex.group(1)
url = 'https://www.' + domain
webbrowser.open(url)
speak('Opening ' + url)
Thank you in advance to anyone that is able to help!
PS Keep in mind I'm a noobie at programming, so go easy on me :)