Add Optius scraper via its official RSS feed

Optius publishes an RSS feed with region/field filters, so no HTML
scraping is needed. Also move the duplicated slug helper into http.ts
(output unchanged, so existing source IDs and URLs are unaffected).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-12 21:29:24 +02:00
co-authored by Claude Opus 5.5
parent 5d30bcf85a
commit ad2fa2b775
6 changed files with 57 additions and 18 deletions
+2 -7
View File
@@ -1,4 +1,4 @@
import { USER_AGENT } from "./http";
import { slugify, USER_AGENT } from "./http";
import type { ScrapedJob, Scraper } from "./types";
// Adecco has no public API, but its job search page loads results from this internal JSON endpoint
@@ -28,12 +28,7 @@ interface AdeccoResponse {
/** The site builds "<title>-<location>/<jobid>" URLs; only the job ID matters, the slug is cosmetic. */
function jobUrl(j: AdeccoJob): string {
const slug = `${j.jobTitle}-${j.jobLocation ?? ""}`
.normalize("NFD")
.replace(/[̀-ͯ]/g, "")
.replace(/[^A-Za-z0-9]+/g, "-")
.replace(/^-|-$/g, "")
.toLowerCase();
const slug = slugify(`${j.jobTitle}-${j.jobLocation ?? ""}`);
return `${JOB_PAGE}/${slug}/${j.jobId.toLowerCase()}`;
}