0

I have an IRC bot based on SkyBot (https://github.com/rmmh/skybot), and I would like to make a command for it that checks a ShoutCast stream and send the output in the format (Current_Song - Artist - Station_Name) as a message to the channel.

Unfortunately, my Python is rusty. I'm trying to pick it back up after about 3 years of leaving it alone. Any help is appreciated.

1 Answers1

2

Easiest way I see it would be:

  • Access the site using urllib or urllib2

  • Use beautifulsoup to get the class/id/tag then retrieve the contents

  • Put the data in a string then send it to the channel with the sockets/irc library

Good luck.

Hairr
  • 1,088
  • 2
  • 11
  • 19
  • Thanks for that. I've been able to get it to output the current song, but I'm still having issues getting the listener count. I'm getting: "StreamTitle='';StreamUrl='';" when I run the command I created. – freeflashstuff Jan 13 '13 at 00:07