Skip to content

Instantly share code, notes, and snippets.

@JasonMadeSomething
Created August 24, 2020 18:44
Show Gist options
  • Save JasonMadeSomething/15a86abad29b8939553fdd9d3a99a4fc to your computer and use it in GitHub Desktop.
Save JasonMadeSomething/15a86abad29b8939553fdd9d3a99a4fc to your computer and use it in GitHub Desktop.
partial of feat parser
function parseFeatPage (data) {
const $ = cheerio.load(data)
const pagetitle = $('article > h1').text()
const description = $('div.row.display-flex > div.article-text > div.page-center > div > p.description').text() || $('div.row.display-flex > div.article-text > div.page-center > div > p:nth-child(1) > i').text()
const sectionHeaders = $('article > div .article-content > p').children('b')
const details = $('article > div .article-content > p')
const reply = {
Name: pagetitle,
Description: description
}
headers.each(function (i) {
})
return reply
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment