mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-11-02 13:12:50 +00:00
fix(jobnet-search): route external ads to jobAdUrl with http(s) validation and fallback (#538) (#557)
External ads (isExternal: true) 404 on /find-job/{jobAdId} and hit the MitID login wall on /job/{jobAdId}. Route them to their employer-provided destination in jobAdUrl when an absolute http(s) URL is present.
When jobAdUrl is missing, empty, or carries an invalid/non-http scheme, fall back to https://jobnet.dk/find-job/{jobAdId} instead of emitting an empty string so downstream /scrape deduplication preserves unique URLs. Both url and jobAdUrl validate the scheme consistently.
Observation and test cases reported by NishilRathod in #557.
This commit is contained in:
1 parent
e2b966d0e7
commit
4a8e63ea7c
5 files changed
+117
-38
No files matched your search
@@ -46,6 +46,15 @@ per-file diff commands.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **`jobnet-search` routes external ads to employer `jobAdUrl` rather than broken `find-job` links**
|
||||
(#538, `.agents/skills/jobnet-search/cli/src/commands/search.ts`, `.agents/skills/jobnet-search/cli/README.md`,
|
||||
`.agents/skills/jobnet-search/cli/tests/search-normalization.test.ts`) - external job postings on
|
||||
Jobnet (`isExternal: true`) point to `/find-job/{jobAdId}`, which returns 404, while the Jobnet API
|
||||
carries the destination in `jobAdUrl`. The search command now routes external ads to `jobAdUrl` when
|
||||
a valid http(s) destination is present, falling back to `/find-job/{jobAdId}` when missing or
|
||||
non-http(s) to preserve distinct URLs for `/scrape` deduplication. Both `url` and `jobAdUrl`
|
||||
validate the scheme the same way. Reported with live testing by NishilRathod.
|
||||
|
||||
- **Fork-skip guards no longer run on a fork during a local test run** (`tests/_upstream.py`,
|
||||
`tests/test_placeholder_integrity.py`, `tests/test_setup_command.py`,
|
||||
`tests/test_upstream_checkout.py`) - the fork skip read
|
||||
|
||||
Reference in new issue
Block a user