Ever wanted to listen to music but don't wanna play the same music as you always do? Enjoy the music from radio stations but with higher bitrate and without ads! radio.net-spotify is an application written in Python that transforms a radio.net station to a playlist storing the most recent tracks. It will sync every three minutes.
Down below are some playlists created with radio.net-spotify.
Antenne Bayern Classic Rock Live
Not having the option to host an instance yourself? Open an issue and I can add the station to my instance and share the playlist. I do not guarantee 100 % uptime.
Create the following file .env
:
USERNAME=<username>
CLIENT_ID=<client ID>
CLIENT_SECRET=<client secret>
Build the docker container: docker build -t radionet-spotify .
Run the docker container: docker run -it --rm --env-file .env -p 8888:8888 radionet-spotify
- Browse radio.net for your favorite radio station.
- Right click and select
Inspect Element
. Tap on theNetwork
tab. - Refresh and look for the first GET request. The ID of the station is the name you see. Copy the station ID to the key of the station's dictionary in
config.py
. - For each radio station you would like to save, create a new Spotify playlist. Copy its Spotify URI within Spotify and store it into the
playlist_uri
field. - Also enter the
station_name
of the station and thelimit
of how many tracks to save in the playlist. Some radio stations, such as Antenne Bayern Classic Rock, have their ads as the track name. Entering the exact name will thus filter these out.
RadioPlay and ILikeRadio are also supported. Finding the respective station ID can be done in similar fashion as for radio.net.
- Create a Spotify application at https://developer.spotify.com/my-applications/
- Add
http://localhost:8888/callback
as a redirect URL for your app. - Add the
Client ID
andClient Secret
keys to theconfig.py
file. - Once it has started, you will be redirected to a page. Copy the URL and paste it into the browser once it asks for it.