mirror of
https://github.com/davidjohnbarton/crawler-google-places.git
synced 2025-12-12 16:38:45 +00:00
Minor fix
This commit is contained in:
parent
8d8dce7ffa
commit
ab3af886f5
|
|
@ -1,6 +1,6 @@
|
||||||
const Apify = require('apify');
|
const Apify = require('apify');
|
||||||
|
|
||||||
const sleepPromised = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
const sleep = Apify.utils;
|
||||||
|
|
||||||
const logError = (msg, e) => {
|
const logError = (msg, e) => {
|
||||||
console.log(`ERROR: ${msg}`);
|
console.log(`ERROR: ${msg}`);
|
||||||
|
|
@ -105,7 +105,7 @@ module.exports = async (page, maxHeight, elementToScroll = 'body') => {
|
||||||
await scrollTo(page, elementToScroll, scrollInfo.scrollHeight);
|
await scrollTo(page, elementToScroll, scrollInfo.scrollHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
await sleepPromised(defaultScrollDelay);
|
await sleep(defaultScrollDelay);
|
||||||
}
|
}
|
||||||
// Scroll back up, otherwise the screenshot of the browser would only show the bottom of
|
// Scroll back up, otherwise the screenshot of the browser would only show the bottom of
|
||||||
// the page
|
// the page
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user