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?
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?
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:
View page source
There are several key javascript variables (as of this writing) used to identify the station and its 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):
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.
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 RadioTrayDetail
Copy the URL from the link provided above
Choose Configure Radios... from Radio Tray
Add the entries shown - paste the URL via CTRL+V
Select iHeart from the RadioTray list.
I heart radio has updated their interface. Now do the following:
:add [url from step2]
.I confirmed this and go WDVE working in cmus by the following on OS X:
brew install cmus
thencmus
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.
It has changed yet again, none of the wireshark solutions, or searching for certain texts in the inspect tab of chrome/firefox helped, but I figured it out...
The example I'll be using is: I heart Mix 90.1 Toluca https://www.iheart.com/live/mix-901-toluca-6566/
Click on the Share icon, it's the one to the right of the 'connect' button.
Look for the Embed Widget section.
Then copy from the end of src=". Example: The whole text is
and I will copy https://www.iheart.com/live/mix-901-toluca-6566/?embed=true
Ok, great. Now we have much less HTML and URLs to work with. Now copy that URL and paste it in your web browser (you can now close the previous radio webpage). Rick click the play button, select Inspect.
Now, using Ctrl+F (press only Ctrl and F), look for
stream
. You should get several results, but they will be all on the same text line, so don't worry.Now double click in that load of JSON data, should start with something like
{"initialPropos" : {.....
, now copy all that text and paste in a text editor which will let you search through text (e.g.vim
,notepad
,MS Word
)Now, open the text editor with the pasted text. Now look for
streams
. The first result should start with something like:,"streams":{"hls...
Great! Now you may copy the stream of your liking, some may not be available, but in this example, the following stream types are available:
Now, you may choose the stream of your liking and open it with your favorite audio/video player. E.g. (be sure to put it in double quotes so it won't get manipulated by your shell or smth)
The End! Now you should be good to go! If I was not at all clear, please tell me so. The only reason I've created a stack overflow account is to post this and help others know how to do this, so please let me know if this is not working!!
Cheers.
(yes, this is a repost answer from here, made by myself and with my express consent to share by myself.
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