Skip to main content


Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Playlist generator from online streams (Read 6675 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Playlist generator from online streams

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:

Code: [Select]
python <search term> [soundcloud] [PLS|ASX|POD|CAST|XSPF]

Code: [Select]
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

Code: [Select]
> python "vainuo goths" cast
# will return URL for "subscribing" to created "podcast"
> python 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:


Playlist generator from online streams

Reply #1
Added Grooveshark option. Script from first post updated.
Every service is accessed through valid API calls despite script name

Code: [Select]
python <search term> [soundcloud|grooveshark|youtube] [PLS|ASX|POD|CAST|XSPF]


Playlist generator from online streams

Reply #2
Okay, I apologize for my really stupid question in advance but I am too anxious to try this out *not* to ask.
Where does the search go? So...
1. Installing python and
2. searching from...?

Sorry, I havent used python scripts before (other than the python grabber from some plugin). Youtube search (besides all the other options you have added) would be so awesome!