fix query selectors for google organic results

This commit is contained in:
Przemek Nowicki 2020-10-30 13:16:40 +01:00
parent 5a0eea201d
commit 5e83c58eaf

View File

@ -57,11 +57,11 @@ class GoogleScraper extends Scraper {
organic_results.forEach((el) => {
let serp_obj = {
link: _attr(el, '.r a', 'href'),
title: _text(el, '.r a h3'),
snippet: _text(el, 'span.st'),
visible_link: _text(el, '.r cite'),
date: _text(el, 'span.f'),
link: _attr(el, '.rc a', 'href'),
title: _text(el, '.rc a h3'),
snippet: _text(el, '.rc > div:nth-child(2) span span'),
visible_link: _text(el, '.rc cite'),
date: _text(el, '.rc > div:nth-child(2) span.f'),
};
if (serp_obj.date) {