Skip to content

Commit

Permalink
feat(scraper): add keydown event to trigger loading of lazy loading r…
Browse files Browse the repository at this point in the history
…essources
  • Loading branch information
PaulPHPE committed Feb 14, 2024
1 parent cb87bb2 commit 2ae89ab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/ecoindex/scraper/scrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ async def scrap_page(self) -> PageMetrics:
await self.page.wait_for_load_state()
sleep(self.wait_before_scroll)
await self.generate_screenshot()
await self.page.keyboard.press('ArrowDown')
await self.page.evaluate(
"window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' })"
)
Expand Down

0 comments on commit 2ae89ab

Please sign in to comment.