Here I am trying to get URL from video element but didn't get
Here when I fire this URL https://www.instagram.com/reel/CYd4S2Wrbtg/ in browser then in inspect I am getting video element something like this:
<video class="tWeCl" crossorigin="anonymous" playsinline="" poster="https://instagram.fstv5-1.fna.fbcdn.net/v/t51.2885-15/e35/271364026_966285387645021_6833216126146124934_n.jpg?_nc_ht=instagram.fstv5-1.fna.fbcdn.net&_nc_cat=1&_nc_ohc=6A2H8WVShtIAX_5F_BN&edm=APfKNqwBAAAA&ccb=7-4&oh=00_AT_-QPwnrPdiefyGa2Y49blLeFbXwPLbZSzisyfuYzkXew&oe=61F3EC67&_nc_sid=74f7ba" preload="none" type="video/mp4" src="https://instagram.fstv5-1.fna.fbcdn.net/v/t50.2886-16/271301651_128273096347718_8827368247380350189_n.mp4?_nc_ht=instagram.fstv5-1.fna.fbcdn.net&_nc_cat=102&_nc_ohc=2X_ChX5ekQkAX8miWrl&edm=APfKNqwBAAAA&ccb=7-4&oe=61F39C7E&oh=00_AT-kSFHSGw1RST72G1xAT1lQ3CO_3BnibPHZUBtVURjbUQ&_nc_sid=74f7ba"></video>
but when I try to get this video element using Axios request I am not getting
axios.get('https://www.instagram.com/reel/CYd4S2Wrbtg/').then(html => {
console.log(html.data, 'r+++++++++++++++')
res.send(html.data);
});
I think the video element is not in the source of the page. What I mean to say is the video element is created using javascript after the body is mounted, which means when you hit a get request you get a basic HTML file with loads of javascript which renders the video later. So in a way, the video element doesn't exist when you hit a get request.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.