Cheerio

Parsing and manipulating HTML and XML.

npm install cheerio

Usage

const $ = cheerio.load(reviewHtml)
const hiddenText = $('span[style="display:none"]')
    .html()
    .replace(/<br\s*\/?>/g, '\n')
    .replace(/<[^>]*>/g, '')

return hiddenText

Last updated