4

I recently installed Radio Tray to my system so I could listen to iHeartRadio, but I don't know where to get the URLs of the Radio stations I like, How do I get them and how do I add them?

2

Summary

The list of stream URLs for the iHeart radio stations is found here.

Look for the stream tag stream_url_v2 and copy the URL. Paste this into RadioTray

Detail

Copy the URL from the link provided above

enter image description here

Choose Configure Radios... from Radio Tray

enter image description here

Add the entries shown - paste the URL via CTRL+V

enter image description here

Select iHeart from the RadioTray list.

  • awesome thanks so much but urls are only available from US. – MSS May 20 '16 at 7:10
  • 1
    doesn't work anymore, see my answer below. – jamescampbell Aug 21 '16 at 3:31
3

Many of the iHeartRadio stations are streamed through Akamai via akacast.akamaistream.net or similar. However, there are several different streams (yes, multiple streams) available. To get the station streams using Chrome:

  1. browse to your iHeartRadio station to listen
  2. right click the page and select View page source

There are several key javascript variables (as of this writing) used to identify the station and its streams.

  1. search (ctrl-f) for "streams"

The relevant text should be in a section of javascript in a variable "window.__store" (also near variable "BOOT"). The data is encoded using JSON. The "streams" area is a compound list of streams for the radio station as "streams":{"key":"value",...}. These key-value pairs list the stream type (key) and its stream (value).

You can use any of these streams that suit your purpose. For example, I get (formatted for clarity):

"streams" : {
  "hls_stream" : "http://c4.prod.playlists.ihrhls.com/3379/playlist.m3u8" ,
  "shoutcast_stream" : "http://kzps-fm.akacast.iheart.com/7/775/20092/v1/auth.akacast.akamaistream.net/kzps-fm" ,
  "secure_rtmp_stream" : "rtmp://cp20092.live.edgefcs.net/live/Dal_TX_KZPS-FM_OR@152687" ,
  "secure_hls_stream" : "https://c4.prod.playlists.ihrhls.com/3379/playlist.m3u8" ,
  "secure_shoutcast_stream" : "https://kzps-fm.akacast.akamaistream.net/7/775/20092/v1/auth.akacast.akamaistream.net/kzps-fm"
}

Now, you're good to go. I've tested all these streams by adding them as stations in Banshee. All but the "secure_rtmp_stream" work. If you want to use RTMP, you'll need to use other tools such as vlc, ffplay, rtmpdump, and flvstreamer.

2

I heart radio has updated their interface. Now do the following:

  1. open up the web inspector in your browser or view the source code.
  2. look at the source code for the phrase "shoutcast_stream", it should be the key and it's value is the link you are looking for that is compatible to stream.
  3. open cmus. once in the interface, type :add [url from step2].
  4. the stream should start playing automatically.

I confirmed this and go WDVE working in cmus by the following on OS X:

brew install cmus then cmus then once in cmus interface type :add followed by the link you just found in step 2, in my case it was:

http://wdve-fm.akacast.iheart.com/7/364/20061/v1/auth.akacast.akamaistream.net/wdve-fm

Enjoy radio music from the command line.

0

Here is a Perl module and sample scripts which can automate the process of locating stream links

https://metacpan.org/release/IHeartRadio-Streams

https://metacpan.org/release/Tunein-Streams

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.