fix: parse minimally-quoted csv rows when loading jobs.csv
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bun
|
||||
import { searches } from "./config.ts";
|
||||
import { parseCsvLine } from "./csv.ts";
|
||||
import { fetchJobs, isViableContent, isViableUrl } from "./fetch.ts";
|
||||
import { fetchDataCareer, fetchStellenBasel, fetchItJobsCh, fetchJobRoom, fetchBaselIntlOrgs, fetchJobBasel, fetchEnglishJobSearch, fetchBaselJobs, fetchSciCore, fetchSwisscom, fetchNovartisBasel, fetchMoreJobs } from "./fetch-other.ts";
|
||||
|
||||
@@ -54,7 +55,7 @@ try {
|
||||
const text = await Bun.file(CSV).text();
|
||||
for (const line of text.split("\n").slice(1)) {
|
||||
if (!line.trim()) continue;
|
||||
const cells = line.replace(/^"|"$/g, "").split('","');
|
||||
const cells = parseCsvLine(line);
|
||||
const link = cells[5];
|
||||
if (link) existingLinks.add(link);
|
||||
if (cells[3]) knownJobKeys.add(langKey(cells[3], cells[4] ?? ""));
|
||||
|
||||
Reference in New Issue
Block a user