Your script look simple but I there is some missing details, for example my idea is to create a python script, this script will check if the url port is open, for example using curl and trying to connect to any url.
Maybe is possible will be possible to check if there any live stream data available, the other problem is that I don't know what is "tag of stream",
what version/distribution linux are u using?
the tag is the name of the song? the streaming server are shoutcast or what protocol?
for example is very easy read the mp3 tags, but in a stream is very hard if you dont know the protocol or the server program.