feat: filter Jobgether listings via blocklist

This commit is contained in:
pyr0ball 2026-03-15 04:50:59 -07:00
parent d0987abc0e
commit ee054408ea
2 changed files with 13 additions and 1 deletions

View file

@ -3,7 +3,8 @@
# Company name blocklist — partial case-insensitive match on the company field.
# e.g. "Amazon" blocks any listing where company contains "amazon".
companies: []
companies:
- jobgether
# Industry/content blocklist — blocked if company name OR job description contains any keyword.
# Use this for industries you will never work in regardless of company.

View file

@ -183,3 +183,14 @@ def test_discover_custom_board_deduplicates(tmp_path):
assert count == 0 # duplicate skipped
assert len(get_jobs_by_status(db_path, "pending")) == 1
# ── Blocklist integration ─────────────────────────────────────────────────────
def test_is_blocklisted_jobgether():
"""_is_blocklisted filters jobs from Jobgether (case-insensitive)."""
from scripts.discover import _is_blocklisted
blocklist = {"companies": ["jobgether"], "industries": [], "locations": []}
assert _is_blocklisted({"company": "Jobgether", "location": "", "description": ""}, blocklist)
assert _is_blocklisted({"company": "jobgether inc", "location": "", "description": ""}, blocklist)
assert not _is_blocklisted({"company": "Acme Corp", "location": "", "description": ""}, blocklist)