feat: add cookie support to kijiji scraper

Add optional cookie parameter to bypass bot detection (403 errors).
Cookies can be provided via parameter, KIJIJI_COOKIE env var, or
cookies/kijiji.json file. Supports both JSON array and string formats.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-23 19:29:13 -05:00
parent 1dce0392e3
commit e4ab145d70
4 changed files with 34 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ export async function kijijiRoute(req: Request): Promise<Response> {
maxPages,
priceMin,
priceMax,
cookies: reqUrl.searchParams.get("cookies") || undefined,
};
try {