🤬
  • Selenium fetcher - screenshot should be taken after 'wait' time, not before #873

  • Loading...
  • dgtlmoon committed 2 years ago
    3ebb2ab9
    1 parent ac98bc91
  • ■ ■ ■ ■ ■ ■
    changedetectionio/content_fetcher.py
    skipped 524 lines
    525 525   # Selenium doesn't automatically wait for actions as good as Playwright, so wait again
    526 526   self.driver.implicitly_wait(int(os.getenv("WEBDRIVER_DELAY_BEFORE_CONTENT_READY", 5)))
    527 527   
    528  - self.screenshot = self.driver.get_screenshot_as_png()
    529  - 
    530 528   # @todo - how to check this? is it possible?
    531 529   self.status_code = 200
    532 530   # @todo somehow we should try to get this working for WebDriver
    skipped 3 lines
    536 534   time.sleep(int(os.getenv("WEBDRIVER_DELAY_BEFORE_CONTENT_READY", 5)) + self.render_extract_delay)
    537 535   self.content = self.driver.page_source
    538 536   self.headers = {}
     537 + 
     538 + self.screenshot = self.driver.get_screenshot_as_png()
    539 539   
    540 540   # Does the connection to the webdriver work? run a test connection.
    541 541   def is_ready(self):
    skipped 86 lines
Please wait...
Page is in error, reload to recover