Update screenshot logic

This commit is contained in:
2025-11-04 20:24:10 +11:00
parent 41a8726fd3
commit 4c41ae1f9a
2 changed files with 5 additions and 1 deletions
BIN
View File
Binary file not shown.
+5 -1
View File
@@ -109,7 +109,11 @@ def capture_screenshot(page_id, screenshot_id, retry_count=0):
driver.get(page.url)
time.sleep(3 + random.uniform(1, 3)) # Wait for initial load
# Get initial window size and document height
# Set viewport to 1366px width (standard laptop resolution, avoids scrollbars)
driver.set_window_size(1366, 768)
time.sleep(1) # Wait for resize
# Get window size after setting viewport
original_size = driver.get_window_size()
# Get total height of the page