Read big boards within the agents' reach: countries and remote from the enabled agents, Europe for favourites, filtered at the source by six hosts

app/jobs/reach.py derives each board's reach once per pull and the pull hands it to the runner through the batch payload. SmartRecruiters, Eightfold and SuccessFactors filter one country a request, Phenom a list, Workday and Oracle by host ids from facets. Remote beside countries is a series of its own, since two facets intersect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 09:55:18 +02:00
1 parent 3adafd8950
commit 3462a4abe7
17 files changed
+1324 -116

No files matched your search

+20 -8
View File
@@ -9,6 +9,14 @@ answered without a cookie, an `Origin` header, a `pageId` or the site's
`country`, both read off the slug's path) and the paging. Nothing is taken
from the page's script. Written from live sites on 2026-09-29 (King, Just Eat
Takeaway, Philips); jobhunt-hq did not read Phenom.
Countries are filtered on the server as a list of English names in
`selected_fields.country`, all in one request (`Filters(country="many")`); the
list is a union, and a role at several places is kept when one of them
matches. Philips answered 111 of 873 for Netherlands and Germany on
2026-09-30. There is no remote field to filter on. A code with no English
name in `_countries` is left out of the list, and a list left empty reads the
whole board.
"""
from __future__ import annotations
@@ -21,7 +29,8 @@ from typing import Any
from desk.sources import strip_html
from ._contract import Ask, Fields, Place, Reads
from ._contract import Ask, Fields, Filters, Place, Reads
from ._countries import name_of
from ._shared import Get, Page, Row, only, parse_dt
NAME = "phenom"
@@ -37,7 +46,8 @@ PATTERNS = (
READS = Reads(
scope="board", listing="paged", page_size=100, text="detail", teaser=True,
complete="stated", places="many", fields=Fields(posted="trusted", remote="stated"),
complete="stated", places="many", filters=Filters(country="many"),
fields=Fields(posted="trusted", remote="stated"),
robots="read: robots.txt allows /<country>/<lang>/search-results (checked 2026-09-29)",
)
@@ -77,19 +87,21 @@ def careers_url(slug: str) -> str:
return f"{_root(slug)}/search-results"
def _body(slug: str, offset: int) -> dict[str, Any]:
def _body(slug: str, offset: int, countries: tuple[str, ...] = ()) -> dict[str, Any]:
"""What the site's search page sends for a listing of every role, newest
first, less the parts that only tell the page what to draw. `lang` is
`en_global` for `/global/en` and `en_us` for `/us/en`, the site's own
spelling on the three sites read."""
first, less the parts that only tell the page what to draw, in the
`countries` (ISO codes) given. `lang` is `en_global` for `/global/en` and
`en_us` for `/us/en`, the site's own spelling on the three sites read."""
_host, country, lang = _parts(slug)
names = [name for code in countries if (name := name_of(code))]
return {
"lang": f"{lang}_{country}", "deviceType": "desktop", "country": country,
"pageName": "search-results", "ddoKey": "refineSearch", "sortBy": "",
"subsearch": "", "from": offset, "jobs": True, "counts": True, "all_fetch": False,
"pageType": "landingPage", "size": PAGE_SIZE, "clearAll": False,
"jdsource": "facets", "isSliderEnable": False, "siteType": "external",
"location": "", "keywords": "", "global": True, "selected_fields": {},
"location": "", "keywords": "", "global": True,
"selected_fields": {"country": names} if names else {},
"sort": {"order": "desc", "field": "postedDate"}, "locationData": {},
}
@@ -106,7 +118,7 @@ def page(get: Get, slug: str, cursor: Any, ask: Ask = Ask()) -> Page:
offset = int(cursor or 0)
host = _parts(slug)[0]
data = json.loads(get(f"https://{host}/widgets", method="POST",
payload=_body(slug, offset)))
payload=_body(slug, offset, ask.countries)))
search = data.get("refineSearch")
if not isinstance(search, dict) or search.get("status", 200) != 200:
raise ValueError("not a Phenom search answer: no refineSearch")