firecrawl
firecrawl copied to clipboard
feat(playwright): expose timezone in scrape result and allow specifying timezone
Summary
Fixes #2383
Adds timezone support to the self-hosted Playwright scraping path.
Changes
playwright-service-ts/api.ts: Addedtimezonefield toUrlModel, passestimezoneIdto Playwright browser context, returns actual browser timezone in responseengines/playwright/index.ts: Forwardsmeta.options.location.timezoneto playwright microservice request body, addstimezoneto response schema and return value
How to test
POST /scrape
{
"url": "https://www.timeanddate.com/worldclock/",
"location": {
"country": "US",
"timezone": "America/New_York"
}
}
Response will include "timezone": "America/New_York"
Notes
- Fire-engine path already handled timezone separately
- This fix closes the gap for self-hosted Playwright users
- Falls back gracefully if timezone not specified
Summary by cubic
Adds timezone support to the self-hosted Playwright scraper so clients can set an IANA timezone and receive the resolved timezone in the response. Closes #2383.
- New Features
- API: Accepts location.timezone in scrape requests and forwards it to the Playwright service.
- Playwright service: Validates the timezone, sets it as timezoneId in the browser context, and includes the resolved timezone in the response.
- Optional field; if not provided, the browser default timezone is used.
Written for commit c2e800b4d2631b22a689a5c0d43a310bc006e71f. Summary will update on new commits.