mirror of
https://github.com/davidjohnbarton/crawler-google-places.git
synced 2025-12-12 08:28:46 +00:00
Updated result from place detail
This commit is contained in:
parent
9f1ae7fca0
commit
d0bea52177
|
|
@ -66,7 +66,7 @@ const extractPlaceDetail = async (page) => {
|
|||
detail.totalScore = parseFloat(detail.totalScore.replace(',', '.'));
|
||||
detail.reviewsCount = await page.evaluate((selector) => {
|
||||
const numberReviewsText = $(selector).text().trim();
|
||||
return (numberReviewsText) ? numberReviewsText.match(/\d+/)[0] : null;
|
||||
return (numberReviewsText) ? parseInt(numberReviewsText.match(/\d+/)[0]) : null;
|
||||
}, reviewsButtonSel);
|
||||
// If we find consent dialog, close it!
|
||||
if (await page.$('.widget-consent-dialog')) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user