Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
43
rated 0 times [  49] [ 6]  / answers: 1 / hits: 19606  / 7 Years ago, sat, february 4, 2017, 12:00:00

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 });
}

More From » node.js

 Answers
7

You can use mitmproxy on a computer to inspect the traffic for the app. I was able to identify http://c10.prod.playlists.ihrhls.com/4342/playlist.m3u8 as the stream source of that radio station. Of course, the url may change over time, so ymmv.


[#59066] Thursday, February 2, 2017, 7 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
uriahw

Total Points: 372
Total Questions: 93
Total Answers: 115

Location: Bahrain
Member since Fri, Sep 16, 2022
2 Years ago
;