Monibrand / google-html-parser

Parse search engine HTML to retrieve ads and other stuff, support Google and Bing
8 stars 3 forks source link

SERP Html Parser

SERP Html Parser can parse Google and Bing results pages to extract organic results, Ads and Shopping Ads.

Features

Usage

const GoogleHtmlParser = require('google-html-parser');

let options = {
  searchEngine: 'google', // or bing
  detectText: ['Annonce', 'Ad', 'Annonce·', 'Ad·'] // You can add some other language for re-count feature
};
GoogleHtmlParser.parse(options, '<html>Your Google snapshot</html>', function(err, extractedDatas){
  console.log(extractedDatas);
});

GoogleHtmlParser.parse(options, '<html>Your Google snapshot</html>')
.then(parsedDatas => {
  console.log(parsedDatas);
});