Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
Add timeout to class and provide default.
Matt Joyce2a39b5382b3f
diff --git a/apps/playwright-service/main.py b/apps/playwright-service/main.pyindex 9cb0c4e57..805c53f8c 100644--- a/apps/playwright-service/main.py+++ b/apps/playwright-service/main.py@@ -15,6 +15,7 @@ app = FastAPI()class UrlModel(BaseModel):url: strwait: int = None+ timeout: int = 15000browser: Browser = None@@ -50,7 +51,7 @@ async def root(body: UrlModel):await page.goto(body.url,wait_until="load",- timeout=body.timeout if body.timeout else 15000,+ timeout=body.timeout,)# Wait != timeout. Wait is the time to wait after the page is loaded - useful in some cases were "load" / "networkidle" is not enoughif body.wait: