gsp

google-search-parser

Parses ads from the HTML of google search page results into json.

Showing:

Popularity

Downloads/wk

1

GitHub Stars

3

Maintenance

Last Commit

8yrs ago

Contributors

1

Package

Dependencies

2

Size (min+gzip)

5.0KB

License

Type Definitions

Tree-Shakeable

No?

Categories

Deprecated!
Deprecated - Functionality is provided by google-search-ads-parser and google-search-results-parser correspondingly

Readme

google-search-ads-parser

Build Status

Parses ads, results from the HTML of google search page results into json.

Usage:

  var parser = require('google-search-ads-parser')
  parser.parseFile('./test/data/example.html');
  parser.parseFile('./test/data/moto-g.html');
    console.log(result);
  });

  // slower but ads complete data
  parser.rich().parseUrl('test/rich_data/1.html', function(data) {
    console.log(data);
  });

Result format:

-- This module takes as input the HTML from a google search results and return a json structure of the following form

query_string : "",
ads : [
    {
        Domain : '', // e.g. ebay.com or amazon.com  (the domain portion of the display url)
        Title : '',
        Line1 : '',
        Line2 : '',  // If just one line - split by ' - ' to produce line 1 and line 2
        DisplayURL : '',
        URL : '',
        Position : 1, // position 1 means that this is ad is the very first one from top to bottom
        IsTop : true,
        IsBottom : false,
        Extensions : {  // http://cl.ly/0h0f2Y1h0d0g
            Review : {
                Quote : '',
                Author : '',
                Url : '',
            },
            Social : {
                Count : 100
            }
            Ratings : {
                Count : 999,
                Rating : 8.3
            },
            SiteLinks : [
                {
                    Title : '',
                    Url : ''
                }
                ...
            ],
            HasCallExtension : True/False
            HasSocial : True/False
            HasSiteLinks : True/False
            HasRatings : True/False
            HasReviews :True/False
         }

    },
    ...
]

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100