Getting a M3U from local news stream?

Anyone know how I can get my local news web stream to link with Channels? So I can watch my news live? Thanks

1 Like

You’ll need to use the web inspector of your browser to try to find the steaming url.

I’ve done this in the past and was unsuccessful. Local news affiliates use outside providers for their streams so they end up being more protected than you’d think. The urls for the streams go stale real fast.

which news link is it

Depending on what market you are in, you may want to check out the fHDHR NewsOn plugin. This assumes you have some technical chops. Not an end-user product.

They use auth tokens that expire after a certain time. Add to that they renew about every 6 seconds. Like Pluto streams.

1 Like

(News ON) The station, WKRN, my ABC affiliate isn't on their list. :frowning:

1 Like
1 Like

Try this and see how long it stays fixed

https://dcs-live.apis.anvato.net/server/play/qAlJONwF58V4coG7/manifest.m3u8?encp=GnP2WG0uxShhCBu-OJ3dlg:0567hFogzOdV4FfqNJo5prBQT7t9oIHQAfKOrjGm0p-iHxWWc1srtSAmt6rRfWMkebTw37jvIG6zBd36rfFURpv-YKVuxFl2tjFu7O8UBDgKQDFNjMWAwNDw0vu2MWvEy8lNrRdq4xGG8HE2USj_S4guK3hpvm1u5bbv8skA9hque2IQ57oYlEoeALICFrzNd32BUGNi-b6FeZbToWoqBPXs7O0LT4suz8x0fn2JAKzlzucqcxLGSMbW14cKM7lADjHP1zEJ9ytMY4NqNY_yd4kwwuw3WNz7wC480iCcaxIiJVRbY0gZbiIQcb37dzUwqFHhXWBYWoZa-tdM6pmzcQBpovgqCDO0X-liBGPDIh9L48JlbgZ0n2MRZ51_g_NTIF62k4savOng2NeMMJ2n4gmGjyon0XdFxOX_AQfuy78qD5kU9WFlhViwL5UnDif3FWbpqdGUpcuh0pmsXoqZ65U1jVV-iLAWARd1-xrC7qX9cMx44Hxj6AFxMgn_u_CpXRdLh15LRexlAoQrU4nBemCaZEMp2Bp-IVEHx0uO9faJngrVCAncMKLeXCg3n_JpZGYWHKXfLMmUf6teqqVO4yyNdfx5qGmVwV7OJbYQqJyF01CQbaHrXcCj52WbAzMwsgpTb-Fx3gW8IpHJPef8ME8aOGNOsI3_GQf_sqUpa8SqulFWfEpBXhNNp0R1ZqEJumDO2wTSpVE59sTzzj7CbOTBytY8Y-MXAQsnsxNG5LQ&anvtrid=w9e80f0d23a031182d068d1175e2cb84&anvauth=tb=0~te=1622867779~sgn=c8351ebe04e43bdc04f0aab816def54c20b74dd9c85c20395f373fb4317287cd&t=1622867689&_vpng=0

Dead already. Those M3U streams are usually only for about 6 seconds, and they're valid for about half an hour?

interesting, I played it for a few mins. Obviously they rotate it quickly. It also seems to vary with the source. I have BBC streams running for months

Looks like the stream URL changes very frequently but you can grab it from the host's API here: https://tkx.apis.anvato.net/rest/v2/mcp/video/adsty8DLenyvgkQ1?anvack=q261XAm2qKEKnu1pqrHrRsYmO1k4PmMB

You could probably write a PHP script to extract the stream URL and redirect to it so it will play via Channels.

Had a friend write me a Python script to run a webserver on Linux, and call to the root M3U stream, which was split, and had to be joined. It all works. (attached code below)

However I need the loaded M3U into Channels to refresh on EVERY view/call/record command sent to it.

Does anyone know a M3U or add on to this Python script I could add to make Channels reload the internal M3U?


from http.server import BaseHTTPRequestHandler, HTTPServer
import requests
import json

URL = "https://tkx.apis.anvato.net/rest/v2/mcp/video/adsty8DLenyvgkQ1?anvack=q261XAm2qKEKnu1pqrHrRsYmO1k4PmMB"
PORT = 8099

class MyServer(BaseHTTPRequestHandler):
    def _gout(self, out):
         self.wfile.write(out.encode("utf-8"))

    def do_GET(self):
        print("Getting data")
        connection = requests.get(URL)
        res = connection.text[22:-1]
        dec = json.loads(res)
        new_url = dec['published_urls'][0]['embed_url']
        print("Got URL: ", new_url)

        print(new_url)
        self.send_response(200)
        self.send_header("Content-type","audio/x-mpegurl")
        self.end_headers()
        self._gout("#EXTM3U\n")
        self._gout('#EXTINF:-1, channel-id="wkrn-2.1", channel-number="2.6", ABC\n')
        self._gout(new_url)
        self._gout('\n')

        print("Finished")

if __name__=='__main__':
    print("Serving on port",PORT)
    with HTTPServer(("0.0.0.0",PORT), MyServer) as httpd:
        httpd.serve_forever()
2 Likes

You would need your python server to create and redirect to the streaming link on demand. See the tablo-for-channels project for an example.

2 Likes

Thanks! Is this on this site? I also need to make a custom guide data. The news feed airs all the time, and airs at the same as the on air station. Right now I'm linking to the WKRN channel for guide data. But would prefer a better solution.

For the time being. Is there a command I can use to refresh that m3u stream without having to pull up the web GUI each time?

This is what I've been doing for a local news station on VUit. I haven't found a better solution except maybe using Webgrabplus to make a custom, repeating xmltv. There are definitely ways to scrape but that's beyond my abilities.

Ok I was able to get a refresh every time by using a PC M3U file that points to the server address on my Linux machine. Now I need to know if I can schedule a advanced recording in Channels when I've made a custom channel, with NO EPG data? I want to just set a time, channel, and duration. I am unsure how to create a custom EPG entry.

This is the thread you're looking for:

2 Likes

This method may be unnecessary. I have found that while my local news channel M3U link DOES expire after a day or 2, after some period of time (without trying to access it) the link starts working again. I waited like 3 months before trying it again. So you need to wait between a few days and 3 months.

Not sure if this works for all local news stations. My station is a Hurst-owned station.

I suspect that the link URL code is randomly generated and then checked against an expired database that flushes itself out on a FIFO basis. It is also possible that Hurst stopped making links expire.

I debated whether or not to post this info so as not to kill the golden goose. But there are only like 80k of us. And if we are willing to wait for link to be resurrected, they should let us stream. If it is a problem, they can integrate the commercials in the stream instead of showing station logo.