import * as cherrio from 'cheerio' const getResource = (data: any) => { const result = { videoHightlight: null, imageHightlight: null, resources: [], }; const $ = cherrio.load(`
${data}
`) const html : any = $('.get-resource').html(); html.find('video, figure img, img').each((index : any, element: any) => { // if (index === 0) result.videoHightlight = }); console.log(html) //
// //
} export { getResource }