mirror of
https://github.com/davidjohnbarton/crawler-google-places.git
synced 2025-12-12 16:38:45 +00:00
Fixed waiting
This commit is contained in:
parent
18ecfca288
commit
111048aee4
|
|
@ -140,11 +140,14 @@ Apify.main(async () => {
|
||||||
maxRequestRetries: MAX_PAGE_RETRIES,
|
maxRequestRetries: MAX_PAGE_RETRIES,
|
||||||
retireInstanceAfterRequestCount: 10,
|
retireInstanceAfterRequestCount: 10,
|
||||||
handlePageTimeoutSecs: 600,
|
handlePageTimeoutSecs: 600,
|
||||||
|
gotoFunction: async ({ request, page }) => {
|
||||||
|
await page._client.send('Emulation.clearDeviceMetricsOverride');
|
||||||
|
await page.goto(request.url, { timeout: 60000 })
|
||||||
|
},
|
||||||
handlePageFunction: async ({ request, page }) => {
|
handlePageFunction: async ({ request, page }) => {
|
||||||
const { label } = request.userData;
|
const { label } = request.userData;
|
||||||
console.log(`Open ${request.url} with label: ${label}`);
|
console.log(`Open ${request.url} with label: ${label}`);
|
||||||
// Get data from review
|
// Get data from review
|
||||||
await page._client.send('Emulation.clearDeviceMetricsOverride');
|
|
||||||
await injectJQuery(page);
|
await injectJQuery(page);
|
||||||
await page.waitForSelector('h1.section-hero-header-title', { timeout: DEFAULT_TIMEOUT });
|
await page.waitForSelector('h1.section-hero-header-title', { timeout: DEFAULT_TIMEOUT });
|
||||||
const placeDetail = await page.evaluate(() => {
|
const placeDetail = await page.evaluate(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user