I wrote another playlist generator. This time streams are generated by search query from SoundCloud or YouTube.
It's written in Python and uses SPL, so any common Python should work, on any platform I guess
script download
What it's supposed to do is provide access to those streams in preferred player instead browser, by providing playlists in various formats:
Usage:
python scrap.py <search term> [soundcloud] [PLS|ASX|POD|CAST|XSPF]
M3U - Extended M3U (EXTM3U) playlist format (with title information)
PLS - simple PLS format (with title information)
ASX - ASX v3 (with title, links, artwork etc.)
POD - XML podcast written to stdout (with title, links, artwork etc.)
CAST - XML podcast uploaded on server with return link for subscribing (with title, links, artwork etc.)
XSPF - XSPF format (with title, links, artwork etc.)
Arguments in square brackets are optional. It defaults to YouTube and M3U and all output is to stdout
Examples:
> python scrap.py "vainuo goths" cast
# will return URL for "subscribing" to created "podcast"
> python scrap.py dighom soundcloud > dighom.m3u && vlc dighom.m3u
#redirect output to m3u file, then open it with vlc
Both SoundCloud and YouTube parsers use regular APIs provided by services. Additionally YouTube is scraped for "hq" streams as their default gdata response does not reveal those (as expected) but only poor quality rtsp streams with 3GP files. I spent some time on improving this approach and as only/best possible solution - every item from YouTube query is parsed with partial request (24KB) to get those streams. On top of it, playlist is valid for 6h afterwhich streams wont work.
It's not throughout tested, but I want to think that script is compact and flexible. Couple of queries in all playlist formats are tested with foobar2000 and VLC successfully. Also got these for podcasts and XSPF: