e38f40732f
Build and Push Docker Images Staging / build (push) Successful in 5m20s
ejobs.ro migrated to a Nuxt SPA - plain HTTP GET returns only the JS bundle. This change equips cv-search-job with a headless Chromium (Playwright 1.60) so it can fully render SPA pages before extracting job links. - Add UseHeadlessBrowser flag to JobProviderEntity, JobProviderConfig, and CvSearchDbContext; map it in JobTokenService.ToConfig so the flag is included in the session provider-config snapshot - Migration: add UseHeadlessBrowser column; fix ejobs.ro search URL (remove /user/ prefix that caused 404) and set UseHeadlessBrowser=true - HtmlJobSearcher: detect flag and dispatch to FetchWithPlaywrightAsync; plain-HTTP path is unchanged; NetworkIdle timeout falls back to partial content rather than failing outright - Dockerfile: download Playwright Chromium in the SDK build stage via npx; copy browser binaries to the final image; install Chromium system libs (Ubuntu noble t64 variants) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
27 lines
1.1 KiB
C#
27 lines
1.1 KiB
C#
namespace CvMatcher.Models.Settings;
|
|
|
|
public sealed class JobSearchSettings
|
|
{
|
|
public bool Enabled { get; set; } = true;
|
|
public string JobSearchLinkBaseUrl { get; set; } = string.Empty;
|
|
public int TokenExpiryDays { get; set; } = 7;
|
|
public int MinMatchScore { get; set; } = 15;
|
|
public int MaxJobsToMatch { get; set; } = 15;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Runtime DTO for a job provider. Populated from <c>cvSearch.JobProviders</c> at session-creation
|
|
/// time and snapshotted to <c>JobSearchSessionEntity.ProviderConfigJson</c>.
|
|
/// </summary>
|
|
public sealed class JobProviderConfig
|
|
{
|
|
public string Name { get; set; } = string.Empty;
|
|
public bool Enabled { get; set; } = true;
|
|
public string SearchUrlTemplate { get; set; } = string.Empty;
|
|
public string JobLinkContains { get; set; } = string.Empty;
|
|
public List<string> InitialKeywords { get; set; } = [];
|
|
public int MaxResults { get; set; } = 20;
|
|
/// <summary>When true the scraper uses a headless Chromium browser to render JS-heavy pages.</summary>
|
|
public bool UseHeadlessBrowser { get; set; }
|
|
}
|