From fa748bebf9707a8a4dbd897bd233e1fe0196ceba Mon Sep 17 00:00:00 2001 From: I Luk Kim Date: Sun, 3 May 2026 12:45:09 -0700 Subject: [PATCH] googlejobs: filter out U.S. Navy company postings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add exclude_company_keywords post-filter (case-insensitive substring match against company field). Configure googlejobs.yaml to exclude "U.S. Navy" / "US Navy" — these recurring military recruitment ads aren't relevant orthodontist openings. Co-Authored-By: Claude Sonnet 4.6 --- gimme_job/models/manifest.py | 1 + gimme_job/runtime/orchestrator.py | 12 ++++++++++++ sites/googlejobs.yaml | 3 +++ 3 files changed, 16 insertions(+) diff --git a/gimme_job/models/manifest.py b/gimme_job/models/manifest.py index a353b8f..2a45d42 100644 --- a/gimme_job/models/manifest.py +++ b/gimme_job/models/manifest.py @@ -55,6 +55,7 @@ class PostFilterConfig(BaseModel): include_posted_text: list[str] = Field(default_factory=list) include_title_keywords: list[str] = Field(default_factory=list) exclude_title_keywords: list[str] = Field(default_factory=list) + exclude_company_keywords: list[str] = Field(default_factory=list) class HealthcheckConfig(BaseModel): diff --git a/gimme_job/runtime/orchestrator.py b/gimme_job/runtime/orchestrator.py index 48d8dfd..898319b 100644 --- a/gimme_job/runtime/orchestrator.py +++ b/gimme_job/runtime/orchestrator.py @@ -329,6 +329,18 @@ class RunOrchestrator: f"(excluded: {manifest.post_filters.exclude_title_keywords})" ) + if manifest.post_filters.exclude_company_keywords: + exc_co = [t.lower() for t in manifest.post_filters.exclude_company_keywords] + before = len(candidates) + candidates = [ + c for c in candidates + if not any(kw in (c.company or "").lower() for kw in exc_co) + ] + logger.info( + f"[{site_id}] company exclude filter: {len(candidates)}/{before} kept " + f"(excluded: {manifest.post_filters.exclude_company_keywords})" + ) + # Ensure fingerprints and deduplicate within batch candidates = ensure_fingerprints(candidates) candidates = deduplicate_in_batch(candidates) diff --git a/sites/googlejobs.yaml b/sites/googlejobs.yaml index 4766373..538f379 100644 --- a/sites/googlejobs.yaml +++ b/sites/googlejobs.yaml @@ -29,6 +29,9 @@ extract: post_filters: include_title_keywords: - orthodontist + exclude_company_keywords: + - u.s. navy + - us navy healthcheck: min_items_expected: 0