mirror of
https://github.com/wahyd4/links.git
synced 2026-08-08 21:04:53 +10:00
Update screenshot logic
This commit is contained in:
Binary file not shown.
+5
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user