diff --git a/changedetectionio/content_fetcher.py b/changedetectionio/content_fetcher.py index 2e8641c8..ec95a794 100644 --- a/changedetectionio/content_fetcher.py +++ b/changedetectionio/content_fetcher.py @@ -472,10 +472,7 @@ class base_html_playwright(Fetcher): browsersteps_interface = steppable_browser_interface() browsersteps_interface.page = self.page - # Execute any browser steps try: - extra_wait = int(os.getenv("WEBDRIVER_DELAY_BEFORE_CONTENT_READY", 5)) + self.render_extract_delay - self.page.wait_for_timeout(extra_wait * 1000) response = browsersteps_interface.action_goto_url(value=url) if self.webdriver_js_execute_code is not None and len(self.webdriver_js_execute_code): @@ -498,6 +495,9 @@ class base_html_playwright(Fetcher): print("Content Fetcher > Response object was none") raise EmptyReply(url=url, status_code=None) + extra_wait = int(os.getenv("WEBDRIVER_DELAY_BEFORE_CONTENT_READY", 5)) + self.render_extract_delay + self.page.wait_for_timeout(extra_wait * 1000) + # Run Browser Steps here self.iterate_browser_steps()