mirror of
https://github.com/FlareSolverr/FlareSolverr.git
synced 2025-06-08 20:45:27 +00:00
Fix Puppeter deprecation warnings
This commit is contained in:
parent
0cbca1fb79
commit
0a438358d1
@ -69,7 +69,7 @@ export default async function resolveChallenge(url: string, page: Page, response
|
|||||||
// wait until redirecting disappears
|
// wait until redirecting disappears
|
||||||
while (true) {
|
while (true) {
|
||||||
try {
|
try {
|
||||||
await page.waitFor(1000)
|
await page.waitForTimeout(1000)
|
||||||
const displayStyle2 = await page.evaluate(() => {
|
const displayStyle2 = await page.evaluate(() => {
|
||||||
return getComputedStyle(document.querySelector('#cf-spinner-redirecting')).getPropertyValue("display");
|
return getComputedStyle(document.querySelector('#cf-spinner-redirecting')).getPropertyValue("display");
|
||||||
});
|
});
|
||||||
@ -96,7 +96,7 @@ export default async function resolveChallenge(url: string, page: Page, response
|
|||||||
}
|
}
|
||||||
|
|
||||||
log.debug('Waiting for Cloudflare challenge...')
|
log.debug('Waiting for Cloudflare challenge...')
|
||||||
await page.waitFor(1000)
|
await page.waitForTimeout(1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.debug('Validating HTML code...')
|
log.debug('Validating HTML code...')
|
||||||
|
@ -177,7 +177,7 @@ async function gotoPage(params: V1Request, page: Page): Promise<HTTPResponse> {
|
|||||||
</html>
|
</html>
|
||||||
`
|
`
|
||||||
);
|
);
|
||||||
await page.waitFor(2000)
|
await page.waitForTimeout(2000)
|
||||||
try {
|
try {
|
||||||
await page.waitForNavigation({waitUntil: 'domcontentloaded', timeout: 2000})
|
await page.waitForNavigation({waitUntil: 'domcontentloaded', timeout: 2000})
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user