how can i get the raw stream url of a iheartradio station.

IncrementTimesTwo picture IncrementTimesTwo · Feb 4, 2017 · Viewed 14.4k times · Source

i am trying to make a discord bot to stream the iheart80s at 103.7 radio station, and so far i can not find a direct stream url to give my discord bot.

i have tried to get the json via python but that just returns http.client.BadStatusLine: ICY 200 OK

i am using discord.js. and here is the function i am trying to feed the stream url into:

function(CmdArg,CmdMsg){
  const voiceChannel = CmdMsg.member.voiceChannel;
  voiceChannel.join().then(connection => resolve(connection)).catch(err =>reject(err));
  const stream = () => {
           return request.get({
               uri: CmdArg,
               followAllRedirects: true,
               encoding: null
           });
       }


    console.log(stream);
    CmdMsg.guild.voiceConnection.playStream(stream, { passes: token.passes    });
}

Answer

Uber fenastray picture Uber fenastray · Dec 2, 2017

I was able to find the iheart url by doing this... Go to desired radio station web site. Click on listen/play. Right click page then view page source. Find/search for..."icy" The first instance of "icy"should be here.. "shoutcast_stream":"http:// (various letters and numbers). playlists.ihrhls.com/(4 numbers) icy" I copy and pasted the http address into winamp and it worked.

http://c10icyelb.prod.playlists.ihrhls.com/4342_icy