mirror of
https://github.com/davidjohnbarton/crawler-google-places.git
synced 2025-12-12 16:38:45 +00:00
Fixed no results in google maps
This commit is contained in:
parent
e48622d4e8
commit
18d7dc1dab
|
|
@ -70,7 +70,8 @@ const enqueueAllPlaceDetails = async (startUrl, searchString, launchPuppeteerOpt
|
||||||
const isNextPaginationDisabled = await page.evaluate((nextButtonSelector) => {
|
const isNextPaginationDisabled = await page.evaluate((nextButtonSelector) => {
|
||||||
return !!$(nextButtonSelector).attr('disabled');
|
return !!$(nextButtonSelector).attr('disabled');
|
||||||
}, nextButtonSelector);
|
}, nextButtonSelector);
|
||||||
if (isNextPaginationDisabled) {
|
const noResultsEl = await page.$('.section-no-result-title');
|
||||||
|
if (isNextPaginationDisabled || noResultsEl) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
// NOTE: puppeteer API click() didn't work :(
|
// NOTE: puppeteer API click() didn't work :(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user