mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-09-17 00:26:26 +00:00
fix(jobbank-search): emit date key derived from posted in search output (#342)
jobbank search output was missing the shared contract's date field; it now emits date as YYYY-MM-DD derived from posted (kept unchanged), null when the feed item has no pubDate. The inline result mapping is extracted into an exported normalizeSearchItem (behavior-preserving) so the derivation is pinned by tests. Co-authored-by: oscarbol09 <80536682+oscarbol09@users.noreply.github.com>
This commit is contained in:
@@ -247,6 +247,7 @@ bun run src/cli.ts search --education 24 --suitable-for 2 --since 2026-03-01
|
||||
"description": "Fuldtidsjob hos Novo Nordisk, Bagsværd (Ansøgningsfrist: 12.04.2026)",
|
||||
"url": "https://jobbank.dk/job/1234567/novo-nordisk/senior-data-scientist",
|
||||
"posted": "2026-03-02T00:00:00+01:00",
|
||||
"date": "2026-03-02",
|
||||
"deadline": "2026-04-12"
|
||||
}
|
||||
]
|
||||
@@ -265,6 +266,7 @@ bun run src/cli.ts search --education 24 --suitable-for 2 --since 2026-03-01
|
||||
| `description` | string | Raw RSS description field (single-line summary) |
|
||||
| `url` | string | Full URL to job posting |
|
||||
| `posted` | string | Publication date in ISO 8601 |
|
||||
| `date` | string \| null | Publication date as `YYYY-MM-DD` (derived from `posted`), or `null` if absent |
|
||||
| `deadline` | string \| null | Application deadline as `DD.MM.YYYY` string, or `null` if "løbende" / not present |
|
||||
|
||||
> `meta.total` is fetched from the HTML page `<title>` in a secondary request (pattern: `"{N} relevante job og karriereopslag"`). If the secondary request fails, `meta.total` is `null`.
|
||||
|
||||
Reference in New Issue
Block a user