From 1ed7c15118fc81427fa29afe6368eb2a47720fd4 Mon Sep 17 00:00:00 2001 From: dvschuyl <125589423+dvschuyl@users.noreply.github.com> Date: Fri, 29 Nov 2024 14:06:04 +0100 Subject: [PATCH] :adhesive_bandage: Page-evaluate navigation destroyed error (#304) Thanks for your contribution and such a nice approach. Now that I think of it, I guess I can make good use of this for some other part of the code. By the way, thank you so much; I will add your name to the new list of contributors. --- crawl4ai/async_crawler_strategy.py | 1 + 1 file changed, 1 insertion(+) diff --git a/crawl4ai/async_crawler_strategy.py b/crawl4ai/async_crawler_strategy.py index e5316187..a41d29a8 100644 --- a/crawl4ai/async_crawler_strategy.py +++ b/crawl4ai/async_crawler_strategy.py @@ -920,6 +920,7 @@ class AsyncPlaywrightCrawlerStrategy(AsyncCrawlerStrategy): }); } """ + await page.wait_for_load_state() await page.evaluate(update_image_dimensions_js) # Wait a bit for any onload events to complete