feat: persist job source and market
CI and Deploy / test (push) Successful in 2m34s
CI and Deploy / deploy (push) Successful in 56s

This commit is contained in:
cesnimda
2026-07-30 23:38:22 +02:00
parent efc9d83c25
commit 988a91a151
12 changed files with 62 additions and 9 deletions
@@ -12,6 +12,8 @@ public sealed record JobImportResult
public string? Language { get; init; } // ISO-ish, e.g. "en", "no"
public string[] Tags { get; init; } = Array.Empty<string>();
public string SourceUrl { get; init; } = "";
public string? Source { get; init; }
public string? CountryCode { get; init; }
public DateTime? Deadline { get; init; }
public bool Success { get; init; }
@@ -21,6 +21,8 @@ public sealed class FinnPlugin : IJobSitePlugin
Location = meta.TryGetValue("job:location", out var loc) ? loc : null,
Description = HtmlExtract.ToPlainText(desc),
Parser = "finn",
Source = "finn",
CountryCode = "NO",
Success = !string.IsNullOrWhiteSpace(title) && !string.IsNullOrWhiteSpace(desc),
};
}
@@ -18,6 +18,8 @@ public sealed class JobbnorgePlugin : IJobSitePlugin
Title = title,
Description = HtmlExtract.ToPlainText(desc),
Parser = "jobbnorge",
Source = "jobbnorge",
CountryCode = "NO",
Success = !string.IsNullOrWhiteSpace(title) && !string.IsNullOrWhiteSpace(desc),
};
}
@@ -20,6 +20,7 @@ public sealed class LinkedInPlugin : IJobSitePlugin
Company = meta.TryGetValue("og:site_name", out var sn) ? sn : null,
Description = HtmlExtract.ToPlainText(desc),
Parser = "linkedin",
Source = "linkedin",
Success = !string.IsNullOrWhiteSpace(title) && !string.IsNullOrWhiteSpace(desc),
};
}
@@ -22,6 +22,8 @@ public sealed class NavPlugin : IJobSitePlugin
Company = siteName, // better than nothing; universal parser often gets this anyway.
Description = HtmlExtract.ToPlainText(desc),
Parser = "nav",
Source = "nav",
CountryCode = "NO",
Success = !string.IsNullOrWhiteSpace(title) && !string.IsNullOrWhiteSpace(desc),
};
}