A European seed of 362 employers, readable or not; discover finds a company's board from its site

The seed was jobhunt-hq's 186 US boards, chosen because they could be read. It is now a hand-picked list of European tech employers, with `board` filled by the new `app.jobs.discover` from each company's own careers site and every board fetched once before it landed: 175 have one, and the rest keep the ATS host their site runs on (Teamtailor 32, Workday 12, SuccessFactors 9, ...) and a careers URL, as rows the app cannot read yet. Companies shows them as "not readable yet" with a link, behind a filter, so the next parser to write is the host that filter shows most.

`app companies discover NAME DOMAIN [--add]` reads the home page, its careers links and the usual paths for a link into a known host, one level down on a careers page, and probes Greenhouse, Lever, Ashby, SmartRecruiters, Recruitee and Personio by slug when the pages link nothing. It is what the LinkedIn flow will call.

Migration 7 adds companies.ats, country and city. The Workable parser now reads the v3 shape its list endpoint actually sends (location object, department list, shortcode and no URL or text); the first populated board showed it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-09-28 15:27:14 +02:00
1 parent c4f2bcc0c9
commit 51d1e67ff9
19 files changed
+3362 -1394

No files matched your search

+13 -1
View File
@@ -91,6 +91,10 @@ CREATE TABLE IF NOT EXISTS role_tags (
-- A company as a target, whether or not any board of it is read. key is
-- models.company_key(name), the slug roles.company_key holds.
-- ats is the host the careers site runs on, readable by the ats plugin or
-- not (workday, successfactors, ...): what discovery found, '' unknown. A
-- company with an ats and no board subscription is one the app cannot read
-- yet. country is an ISO code and city the head office's.
CREATE TABLE IF NOT EXISTS companies (
key TEXT PRIMARY KEY,
name TEXT NOT NULL,
@@ -99,7 +103,10 @@ CREATE TABLE IF NOT EXISTS companies (
careers_url TEXT NOT NULL DEFAULT '',
notes TEXT NOT NULL DEFAULT '',
created_at TEXT NOT NULL,
updated_at TEXT NOT NULL
updated_at TEXT NOT NULL,
ats TEXT NOT NULL DEFAULT '',
country TEXT NOT NULL DEFAULT '',
city TEXT NOT NULL DEFAULT ''
);
-- The targets desk's runner hands to plugins. newsdesk's shape, with its two
@@ -319,6 +326,11 @@ SELECT (SELECT id FROM agents ORDER BY enabled DESC, id LIMIT 1), key, affinity,
ALTER TABLE roles DROP COLUMN vote;
ALTER TABLE roles DROP COLUMN voted_at;
ALTER TABLE companies DROP COLUMN affinity;
"""),
(7, "companies.ats, country and city: a company the app cannot read yet is still a row", """
ALTER TABLE companies ADD COLUMN ats TEXT NOT NULL DEFAULT '';
ALTER TABLE companies ADD COLUMN country TEXT NOT NULL DEFAULT '';
ALTER TABLE companies ADD COLUMN city TEXT NOT NULL DEFAULT '';
"""),
)
+7 -5
View File
@@ -69,7 +69,7 @@ _VOTED_SCORE = ("MIN(1.0, s.score * CASE v.vote WHEN -1 THEN 0.5 "
#: nothing, so `vote` and `voted_at` are NULL: one query shape either way.
_WITH_VOTES = "LEFT JOIN role_votes v ON v.uid = roles.uid AND v.agent_id = ?"
_COMPANY_FIELDS = ("name", "domain", "status", "careers_url", "notes")
_COMPANY_FIELDS = ("name", "domain", "status", "careers_url", "notes", "ats", "country", "city")
#: A company as the store serves it: the row and the asked-for agent's affinity.
_COMPANY_SELECT = """SELECT c.*, COALESCE(ac.affinity, 0) AS affinity FROM companies c
@@ -944,7 +944,8 @@ class Store:
def add_company(self, name: str, *, key: str = "", domain: str = "",
status: str = "researching", careers_url: str = "",
notes: str = "") -> Company:
notes: str = "", ats: str = "", country: str = "",
city: str = "") -> Company:
"""Raises ValueError on a key already taken."""
name = name.strip()
key = key or company_key(name)
@@ -954,9 +955,10 @@ class Store:
try:
self._write(
"""INSERT INTO companies (key, name, domain, status, careers_url, notes,
created_at, updated_at)
VALUES (?,?,?,?,?,?,?,?)""",
(key, name, domain, status, careers_url, notes, stamp, stamp))
ats, country, city, created_at, updated_at)
VALUES (?,?,?,?,?,?,?,?,?,?,?)""",
(key, name, domain, status, careers_url, notes, ats, country, city,
stamp, stamp))
except sqlite3.IntegrityError as exc:
raise ValueError(f"company {key!r} already exists") from exc
return self._company(key)