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:
@@ -45,3 +45,12 @@ export function decodeEntities(s: string): string {
|
||||
}
|
||||
|
||||
export const clean = (s: string) => decodeEntities(s).replace(/\s+/g, " ").trim();
|
||||
|
||||
/** ASCII URL/ID slug: "Inženir (m/ž)" -> "inzenir-m-z". */
|
||||
export const slugify = (s: string) =>
|
||||
s
|
||||
.normalize("NFD")
|
||||
.replace(/[̀-ͯ]/g, "")
|
||||
.replace(/[^A-Za-z0-9]+/g, "-")
|
||||
.replace(/^-|-$/g, "")
|
||||
.toLowerCase();
|
||||
|
||||
Reference in New Issue
Block a user