would be neat
Build and Push Docker Images / build-and-push (push) Failing after 20s

This commit is contained in:
2026-03-27 09:47:09 +01:00
parent d45b5ea521
commit 85dd29a457
5 changed files with 46 additions and 1 deletions
@@ -55,6 +55,22 @@ async def visit_url_service(decoded_url):
# Perform the operation
return await safe_browser_operation(decoded_url, visit_operation)
async def screenshot_url_service(decoded_url, full_page=True):
"""Service function to visit a URL and return a screenshot as PNG bytes"""
print(f"Taking screenshot of: {decoded_url}")
async def screenshot_operation(page):
try:
await page.goto(decoded_url, wait_until='networkidle', timeout=30000)
await page.wait_for_timeout(1000)
screenshot_bytes = await page.screenshot(full_page=full_page, type='png')
return screenshot_bytes
except Exception as e:
print(f"Error during screenshot capture: {e}")
return {"status": "error", "url": decoded_url, "error": str(e)}
return await safe_browser_operation(decoded_url, screenshot_operation)
async def extract_seo_service(decoded_url):
"""Service function to extract SEO information from a website"""
print(f"Extracting SEO from: {decoded_url}")