Jump to content

Recommended Posts

I'm trying to get file content to extract m3u8 link of this page: http://tv24.vn/livetv/vtv1.html

It requires to login; (they use jlogin method)

 

I give here my login info for you to test

user: h2132704@trbvm.com
pass: 12345678

<?php
$return = file_get_contents("http://h2132704@trbvm.com:12345678@tv24.vn/livetv/vtv1.html");
preg_match('/file: \"(.*?)\"/', $return, $m3u8);
$hls=str_replace("http","hlsvariant://http",$m3u8[1]);
echo "Starting livestreamer...\n\n";
echo passthru("C:\livestreamer\livestreamer \"$hls\" 496p -o C:\livestreamer\Test.ts");
echo "Done.\n";


?>

Any solution ?

 

Sorry for my bad English  :tease-03: 

They use javascript to load player and also inject the video source.

PHP does not parse javascript.

You can manually get them using dom inspector though.

<script>
                                jwplayer("player-embed").setup({
                                    height: '506',
                                    width: 'auto',
                                    sources: [
                                        { file: "http://vtsstr4.sctv.vn/f1betalive2/c043_mb.smil/playlist.m3u8?t=c990873dd900fa5da3b30fb01bbd2f545d4648acf339e3a8eb18a487717a6a7b&e=1446519291" }
                                    ],
                                    autostart: 'true'
                                   
                                });
</script>

 

They use javascript to load player and also inject the video source.

PHP does not parse javascript.

You can manually get them using dom inspector though.

<script>
                                jwplayer("player-embed").setup({
                                    height: '506',
                                    width: 'auto',
                                    sources: [
                                        { file: "http://vtsstr4.sctv.vn/f1betalive2/c043_mb.smil/playlist.m3u8?t=c990873dd900fa5da3b30fb01bbd2f545d4648acf339e3a8eb18a487717a6a7b&e=1446519291" }
                                    ],
                                    autostart: 'true'
                                   
                                });
</script>

Can I use Javascript to get the latest m3u8 link at the specific time ? I use livestreamer to capture video

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.