I am trying to make an internet radio based on opening and closing the web browser to start and stop the radio but I can't for some reason close the browser using different methods.
I have already tried using the subprocess method.
import subprocess as sp
web = sp.Popen("epiphany http://www.google.com", shell=True)
but after doing that i could neither close the process with
web.kill()
nor with
web.terminate()
It simply did nothing.
I also tried using the selenium method but as I am trying to do this on a raspberry pi, so the only browser is epiphany that is not supported and I could not get a different supported browser to install.
The webbrowser module in python does not seem to have any closing function
Is there a way I could manage to close the browser?