Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
<div class="_5wCQW"> <video class="tWeCl" playsinline="" poster="https://instagram.fhen1-1.fna.fbcdn.net/vp/a976306a61cf8e479067e8ce96af5c42/5C0A0D28/t51.2885-15/e35/46093420_372126340028280_6102722465585727755_n.jpg" preload="none" src="https://instagram.fhen1-1.fna.fbcdn.net/vp/018d274540902bafb43ee254174faafc/5C09F710/t50.2886-16/47786125_419033321967458_5420819962497335296_n.mp4" type="video/mp4"> </video> <img class="_8jZFn" src="https://instagram.fhen1-1.fna.fbcdn.net/vp/a976306a61cf8e479067e8ce96af5c42/5C0A0D28/t51.2885-15/e35/46093420_372126340028280_6102722465585727755_n.jpg" alt=""> </div>
const cheerio = require('cheerio'); // npm install cheerio const request = require('request'); // npm install request const URL = 'https://www.instagram.com/p/Bq8MmN2hi9B/?hl=en'; // Video URL request(URL, function (error, response, body) { /* ... Error Handling Here ... */ const $ = cheerio.load(body); const videoTag = $('meta[property="og:video"]').attr('content'); // through meta tag /* Through video tag Wait until document has been completely loaded then: const videoTag = $('.tWeCl').attr('src'); */ console.log(videoTag); // console output: https://instagram.fhen1-1.fna.fbcdn.net/vp/c59dc1712ed9a3386fecae951422e602/5C0B1BF2/t50.2886-16/47059203_507364433101104_5625153989382242304_n.mp4 });