python-shoutcastfeed 0.1
At the moment i am developing a small application for recording online radio streams in python / pygtk and gstreamer. It can browse the Shoutcast yellowpages service (a list of all available stations). For that purpose i developed a small wrapper, which i call python-shoutcastfeed.
I am aware that there already exists a python class for that, but it doesn’t seem to be maintained any longer and i couldn’t find a valid download link. It used to be available at http://www.excentral.org.
This version has two main features:
- Getting a list of all genres
- Getting a list of stations for a given genre (limiting the number of received stations to a user-defined value)
So, first you have to call get_genres() to get a list of the genres available on shoutcast. Then call get_stations_for_genre() to get a list of dicts for each station.
Further notes:
- This needs cElementTree. It should be integrated in Python starting from 2.5. Otherwise you might have to install it manually
- No caching: The class should dump the received stations to a file on-disk which can be re-used later. This saves time and bandwidth. The Cache’s TTL should be user-defined.
- Could use some more error checking. If it works “for me” it doesn’t mean it will always work.
Those features will probably be implemented in later versions, so stay tuned. In the meantime you can get the current version from HERE
Oh, yeah, and it’s GPL Software, so feel free to modify, change, improve it!
hi…
nice work!
are you planning on writing a wrapper to get the icecastfeeds from
http://dir.xiph.org/index.php
this would be a nice feature for streamtastic
Hmm maybe i should have written that this thing is outdated, as i decided to write the recording
app in java. So i should probably take a look at this…
I suppose streamripper can rip icecast streams too, so it should not be that difficult to implement.
Regards,
Andreas
don’t worry… i knew that you allready ported this feature to your java-app.
but the idea came to my mind when i read this article, while ripping an icecaststream^^
btw somebody allready implemented an Icecast Station Browser Plugin for winamp
http://www.oddsock.org/tools/ml_icecastlist/
Okay
well i plan to hack on streamtastic a bit more in the future, so that would be a nice addition, thanks
for your great idea !