mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-09-17 00:26:26 +00:00
fix(scrape): add a client-side recency fallback for flagless portals
Step 1b.3's "scope to 14 days using the portal's recency flag" was unsatisfiable on jobdanmark, which has no date filter or sort - the agent either silently skipped the scoping or invented a flag, and the CLIs now reject invented flags loudly. Every portal emits date, so the instruction now filters client-side after the call, and stops presenting --order (a sort) as interchangeable with a filter. Review finding F32 (2026-08-19). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
2c3d2d8558
commit
9a69309749
@@ -66,7 +66,7 @@ For each **enabled** portal skill:
|
||||
|
||||
1. Read its `SKILL.md` to find the correct `bun run …` invocation and supported flags.
|
||||
2. Translate the query terms from `search-queries.md` into that portal's flag format (e.g. `--key`, `--search-string`, `--query`, filter codes — whatever the portal's SKILL.md specifies).
|
||||
3. Scope to the last 14 days using the portal's supported recency flag (`--jobage`, `--since <YYYY-MM-DD>`, `--order PublicationDate`, etc. — as documented per portal).
|
||||
3. Scope to the last 14 days using the portal's supported recency **filter** flag (`--jobage`, `--since <YYYY-MM-DD>`, etc. — as documented per portal). A portal with **no recency flag** (jobdanmark offers none) still gets scoped: every portal's search output carries a `date` field, so filter client-side — drop results whose `date` is older than 14 days after the call returns, and never invent a flag the portal's SKILL.md does not document (the CLIs reject unknown flags). `--order PublicationDate` is a sort, and a sort is not a filter — pairing it with a `--limit` is a defensible approximation on a portal that offers nothing better (jobnet), but apply the client-side date filter on top all the same.
|
||||
4. Cap results to ~20 per call using the portal's limit flag.
|
||||
5. Use `--format json` for machine-readable output.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user