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:
@@ -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()}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user