kfahn commited on
Commit
d40b66d
·
verified ·
1 Parent(s): ee1f53a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -88,8 +88,8 @@ async def capture_screenshot():
88
  await page.goto(image_url, timeout=120000) # Wait for the image page to load
89
 
90
  print("Waiting for image element...")
91
- await page.wait_for_selector("img", timeout=120000) # Wait for the <img> to be visible
92
-
93
  print("Capturing screenshot...")
94
  await page.screenshot(path="img.png")
95
  await browser.close()
 
88
  await page.goto(image_url, timeout=120000) # Wait for the image page to load
89
 
90
  print("Waiting for image element...")
91
+ # await page.wait_for_selector("img", timeout=120000) # Wait for the <img> to be visible
92
+ await page.wait_for_timeout(5000) # Allow sketch to fully render
93
  print("Capturing screenshot...")
94
  await page.screenshot(path="img.png")
95
  await browser.close()