From 84b4040a0b2424eb4590639aa67ad28627cb58ba Mon Sep 17 00:00:00 2001 From: drobnikj Date: Tue, 8 Jan 2019 12:37:50 +0100 Subject: [PATCH] Fixed occupancy sel --- src/places_crawler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/places_crawler.js b/src/places_crawler.js index 9b6f9e8..79539ef 100644 --- a/src/places_crawler.js +++ b/src/places_crawler.js @@ -45,7 +45,7 @@ const extractPlaceDetail = async (page) => { }); // Finds values from y axis $(this).find('.section-popular-times-bar').each(function (barIndex) { - const occupancyMatch = $(this).attr('aria-label').match(/\d+\s+?%/); + const occupancyMatch = $(this).attr('aria-label').match(/\d+(\s+)?%/); if (occupancyMatch && occupancyMatch.length) { const maybeHour = graphStartFromHour + barIndex; graphs[day].push({