Welcome Guest ( Log In | Register )

> Upload forum rules

- No over 30 sec clips of copyrighted music. Cite properly and never more than necessary for the discussion.

- No copyrighted software without permission.

- Click here for complete Hydrogenaudio Terms of Service

Playlist generator from online streams, scraping SoundCloud, YouTube
post Oct 28 2011, 08:52
Post #1

Group: Members
Posts: 717
Joined: 16-January 09
Member No.: 65630

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 wink.gif

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:

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

> 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:

scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
Start new topic
post Nov 3 2011, 15:32
Post #2

Group: Members
Posts: 147
Joined: 3-November 11
Member No.: 94918

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!
Go to the top of the page
+Quote Post

Posts in this topic

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 30th November 2015 - 13:22