VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. If you go to https://www.foxlocal.com/ you can view live programming from Fox network channels in several major U.S. cities. They are shown as tiles and if you click on a tile, for example New York, it takes you to the local station's site such as https://www.fox5ny.com/ and a window near the top of the screen starts playing the stream. If you then bring up your browser's "Web developer tools" and enter m3u8 in the search box (network tab) and refresh the page, it will show a manifest.m3u8 link and then several rendition.m3u8 links. if your right click on the manifest.m3u8 link and copy it, and then open VLC and open that link as a network stream (and if you are quick enough doing that, since those links apparently have a very short expiration) it will play in VLC as long as you don't stop the stream or there is no network interruption, etc. If the stream is stopped for any reason then you have to repeat the process, starting with re-getting the manifest.m3u8 link.

    I think the link changes every couple minutes or so but somehow VLC (and the web player) seem to be able to follow along once you start the stream using the manifest.m3u8 file. However, I don't want to watch it in VLC, I want to use it as an input for Tvheadend. In order to do that I need to find some way to get that m3u8 link using a script of some kind, and in order for it to be useful in Tvheadend that script cannot depend on a web browser being installed, because Tvheadend runs in a Docker container on a server that has no desktop installed. I thought about Selenium but that would require a desktop environment and web browser to be present, and also I have never had great luck with Selenium; maybe it's just that I don't know how to use it but when I tried to use it in the past it was very unreliable.

    So my question is, is there any way to get the m3u8 link using curl, wget, or some other Linux tool(s)? What would really be great is if there were a program that could get that link from the page url, start the stream (and restart it if it gets interrupted) and then make it available on a local port, so that Tvheadend could always go to the same address (such as localhostort), but if such a program doesn't exist I can still make it work (I think) as long as I can get the m3u8 link, in that case the only thing I can't do is automatically restart the stream if it gets interrupted, but that should not be an issue 99% of the time.

    I'm hoping there might be a way to do this from a script, so any help would be very much appreciated!
    Quote Quote  
  2. the videoId and anvack/accessKey from the html source is always the same:
    [url]https://tkx.mp.lura.live/rest/v2/mcp/video/adstR4XbPVnXPOAx?anvack=7xyKOOK7XpcObLZu5S7Ea8BTD7GpZyve
    output with m3u8 link:
    anvatoVideoJSONLoaded({"upload_id":"adstR4XbPVnXPO Ax","mcp_id":"EPFOX","owner_id":"200012","def_titl e":"FOX Weather","def_callsign":"WNYW","dvr":"","video_typ e":"2","src_image_url":"","src_logo_url":"https :\/\/c107833-mcdn.mp.lura.live\/expiretime=2082787200\/88f91bf48705df5d02aa28dfa320ff8cfa4514f9f9e98021a5 a30f1947f2782e\/iupl\/08498901DFE3A7FAFAD75D002999792E.jpg","published_u rls":[{"embed_url":"https:\/\/dcs-live.mp.lura.live\/server\/play\/V72qBb2IvL6ESNpj\/manifest.m3u8?encp=k7hhpa-6XcSse9lSTDm-Pg:A1lC9veiXVd5sxpDCen6n6zYW83camHQTI0F3cCGG6zqswM BkKB-OTwbh7JEToJLWCkO2-7q7isTb3OSxf1va7fYNIYWrOWvw0MLlHZWcx0eNzw9bUA8pH7H ImNLA0xjcCM23Ku68SXudO4-Ei2X1HCyKsBUy-GQafHd6WtJ_v6gwP80ILHTFhrjaUPbUWHyO9uA6PRXRXeGJrIm essHDcBklBZVrqDo35q2EH2AU8dNEGdqm4yfwD1-b2drOJoOUTni-9U8-FC6XXiQmQJwQ6iZxLsmIVfdVD4E7LQIpwuIxXZbOQiUbnsdjT8 H0j2M5uWd0TtezYeU-TL1DtZK0sSv469eJY68TnJrKwQpd-FWvok4g7q31j40m-TRBOf4gmxv3WK2ShyEMAJE21mCRtaRFaFxRuomjmUx3bTMaQg7 NZKNVBm36GxBSs8aTDDEBt3F8gd0XpaOuQGQoyuiMlyOhYrgzR MpvYos5Jx2IF9P-QXF1_OHwmmNvda958NOatqc3JqSCDVJmeYjrpcHvFOWSWlaJBP S8W1bMZaOJwq6ulNTNW4C4FKaz6_GEeCJ4yJigVuteBYzNYIDi pMhGMI3k2rMv9s1gm8eukhBLFS4LOp2Ru_JvVerr-ZY83VJElZ3bwaLVoDQ1xjOXxxevYnbcCqIDkQADTFp9tHM1cRJ QHdnWnVYs5P66jMdapXV&anvtrid=4e9f6daf27322552b36c9 ac2098b0904&anvauth=tb=0~te=1736144750~sgn=a6d9ee2 80c7c5373a3a300f658ffb8c1ac8951534334973eeb1204fa0 c7e055d&t=1736144660","format":"m3u8-variant","kbps":0,"cdn_name":"","format_name":"m3u 8-variant","width":0,"height":0,"cdn_id":-1,"protocol":"https","update_url":"https:\/\/dcs-live.mp.lura.live\/server\/session\/update?stream=V72qBb2IvL6ESNpj&anvsid={{DCS_SESSIO N_ID}}"}],"logo_settings":[],"common":[],"drm_mode":"","source_channel_id":"100032","reque sted_id":"adstR4XbPVnXPOAx","redirected_id":null," primary_id":null,"def_description":"Live weather coverage from FOX Weather.","ts_broadcast_start":"1736136019","ts_br oadcast_end":"1736155680","captions":[],"custom_metadata_map":{"live":"Yes","scheduleType ":"NEW"},"access_rule_id":"","dvr_disable":"","acc ess_rules":[],"generated":"at 1736144660 in 0.95132994651794 sec"})
    Quote Quote  
  3. Thank you, I really appreciate the help.
    Quote Quote  
  4. https://www.fox5ny.com/

    Batch code:

    @echo off
    setlocal EnableDelayedExpansion
    set "Url=https://tkx.mp.lura.live/rest/v2/mcp/video/adstR4XbPVnXPOAx?anvack=7xyKOOK7XpcObLZu5S7Ea8BTD7 GpZyve&anvtrid=w2285700053826a13df96174adfcb7b7d&r typ=fp&X-Anvato-Adst-Auth=8O7foqC4uyJp/CXVguhUhDWQOD4ejAsmH+V8Cs/Ml0VQiIof9cfK2rxxWaabVkxykXTx7lSKG9ZIBdZUCmuLWQ=="
    set "Url=!Url:&=^&!"&for /F "Tokens=10 Delims=," %%i in ('curl.exe -ksS --url !Url!') do (set Url=%%i)
    set "Url=!Url:~32,-1!"
    set "Url=!Url:\=!"
    start "" vlc !Url!

    'curl.exe' and 'vlc.exe' must be written to 'Path'.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!