fb-video-scrapper
Version:
Scrape and extract facebook video url and thumnails
16 lines (11 loc) • 493 B
text/typescript
import cheerio from "cheerio";
function parser (html: string) {
const $ = cheerio.load(html);
const description = $("[name=description]").attr("content");
const title = $("[property=og:title]").attr("content");
const image = $("[property=og:image]").attr("content");
const video = $("[property=og:video:url]").attr("content");
const video2 = $("[property=og:video]").attr("content");
return { description, title, image, video, video2 }
}
export default parser;