
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
generator-html-parser
Advanced tools
A generator for Yeoman.
It generates the basic structure of an html parser in node.js.
Useful if you are doing scraping with node.js.
To install generator-html-parser from npm, run:
$ npm install -g generator-html-parser
mkdir facebook-html-parser && cd $_yo html-parserThat's it!
The main file is <site-name>-html-parser.js.
It contains two methods
parse(html,url): it receives as input the html (string) to parse and an url (string), useful if you need to resolve some relative url with the node module Url (already imported)getNextPages(html,url): to get the urls of next pages to surf. Usually useful when you are scraping a list of pages. Still, it takes as input the html (string) to parse, and the url (string) to resolve eventually urls extracted from the html.The generated code contains code for testing as well.
Have a look at the folder test/
It is based on cheerio to parse the html.
Cheerio is like jQuery, but faster.
$ = cheerio.load(html);
$('.item').each(function() {
var el=$(this);
result.push(el.text());
})
FAQs
A generator for Yeoman
We found that generator-html-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.