User Tools

Site Tools


myapps:pyshoutcast

PyShoutcast

What is it?

PyShoutcast is an online radio crawler on shoutcast.com. Created in python, it should be able to retrieve radio infos without going to the website in a browser a clicking several times 'Show more' button. Of course, visiting shoutcast.com has its advantages, so look at this script as pythonic fun ;)

How can I get it?

You can grab version 0.4 from here

How do I install?

From the source:

python setup.py install

or just run it directly as any other script:

python pyshoutcast.py

How to use it?

Main Help

Usage: pyshoutcast.py [OPTIONS]
 
A python based crawler for shoutcast.com
 
Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -m, --list-main-genres
                        List main available genres
  -s main_genre_id, --list-secondary-genres=main_genre_id
                        List secondary genres under a main one. Provide the
                        genre id or the name for it.
  -g genre_name, --get-radio=genre_name
                        Get the radios under a genre name.
  -e, --export          Exports the result to a csv file (Available only for
                        -g).

  • grab main sections

Main Sections

$ python pyshoutcast.py -m

  • grab the subsections for a main one using main id or main name

Using main id or main name

$ python pyshoutcast.py -s 265 
OR
$ python pyshoutcast.py -s 'Seasonal/Holiday'

  • finally, get some radio info

Getting info

$ python pyshoutcast.py -g Smooth Jazz

  • to export the results from -g option in a csv file (put in the exports folder)

Add -e option

$ python pyshoutcast.py -g Smooth Jazz -e

Screenshots

Exported file
 Get Main sections

 Get with export to csv file
 Get Secondary sections


 Scripts.com

myapps/pyshoutcast.txt · Last modified: 2013/03/16 17:40 (external edit)