mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
wait until body is fetched
This commit is contained in:
parent
431c4cc098
commit
e61da03ed4
1 changed files with 2 additions and 2 deletions
|
|
@ -336,8 +336,6 @@ async function retrievePage(
|
|||
throw new Error('No response from page')
|
||||
}
|
||||
|
||||
await page.waitForSelector('body')
|
||||
|
||||
const finalUrl = response.url()
|
||||
const contentType = response.headers()['content-type']
|
||||
|
||||
|
|
@ -364,6 +362,8 @@ async function retrieveHtml(page: Page, logRecord: Record<string, any>) {
|
|||
title = await page.title()
|
||||
logRecord.title = title
|
||||
|
||||
await page.waitForSelector('body')
|
||||
|
||||
const pageScrollingStart = Date.now()
|
||||
/* scroll with a 5 seconds timeout */
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in a new issue