feat: filter Jobgether listings via blocklist
This commit is contained in:
parent
4d08e64acf
commit
8d9e17d749
2 changed files with 13 additions and 1 deletions
|
|
@ -3,7 +3,8 @@
|
||||||
|
|
||||||
# Company name blocklist — partial case-insensitive match on the company field.
|
# Company name blocklist — partial case-insensitive match on the company field.
|
||||||
# e.g. "Amazon" blocks any listing where company contains "amazon".
|
# 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.
|
# 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.
|
# Use this for industries you will never work in regardless of company.
|
||||||
|
|
|
||||||
|
|
@ -183,3 +183,14 @@ def test_discover_custom_board_deduplicates(tmp_path):
|
||||||
|
|
||||||
assert count == 0 # duplicate skipped
|
assert count == 0 # duplicate skipped
|
||||||
assert len(get_jobs_by_status(db_path, "pending")) == 1
|
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)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue