Readers oracle to workday and the providers hand on the host's words; their word tables move to app/prep/hosts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 11:07:07 +02:00
1 parent a66aac95cf
commit 06eb929eaf
48 files changed
+460 -388

No files matched your search

+3 -19
View File
@@ -59,7 +59,7 @@ from desk.sources import strip_html
from ._contract import Ask, Fields, Filters, Place, Reads
from ._countries import NAMES
from ._shared import Get, Page, Row, add_place, country_if_single, is_web_url, only, parse_dt
from ._shared import Get, Page, Row, add_place, is_web_url, only, parse_dt
NAME = "successfactors"
LABEL = "SuccessFactors"
@@ -86,7 +86,7 @@ KEEP_CASE = True
READS = Reads(
scope="board", listing="paged", text="detail", complete="stated", places="many",
filters=Filters(country="one"),
fields=Fields(posted="trusted", country="stated"),
fields=Fields(posted="trusted"),
robots="read: robots.txt allows /search/ and /job/ (checked 2026-09-29)",
)
@@ -342,19 +342,6 @@ def _posted(value: str) -> datetime | None:
return parse_dt(value)
def _country_code(meta: dict[str, str]) -> str:
"""The address's country as an ISO code: `addressCountry`, or the code that
`_place` reads in a `streetAddress`; '' for neither."""
code = meta.get("addressCountry", "").strip().upper()
if len(code) == 2:
return code
parts = [part.strip() for part in meta.get("streetAddress", "").split(",")]
for i in range(len(parts) - 1, 0, -1):
if len(parts) - i <= 2 and parts[i] in _COUNTRIES:
return parts[i]
return ""
def _location(meta: dict[str, str]) -> str:
"""The address as "City, Country". Vestas and Demant state
`addressLocality` and `addressCountry` (a code), the other sites one
@@ -373,7 +360,7 @@ def detail(get: Get, slug: str, row: Row) -> dict[str, Any]:
"""A role's own page: `description` from the block marked
`itemprop="description"`, which Novo Nordisk's pages have without the
microdata around it, and, from a page that has the `JobPosting` microdata,
`posted` (`datePosted`) and every place with the country's code. A page that
`posted` (`datePosted`) and every place. A page that
is not a role's (the site answers 200 for a closed one with its search) has
no description block and gives an empty answer."""
text = get(row["url"]).decode("utf-8", "replace")
@@ -396,9 +383,6 @@ def detail(get: Get, slug: str, row: Row) -> dict[str, Any]:
if places:
out["places"] = places
out["location"] = "; ".join(p["text"] for p in places)
codes = {_country_code(address) for address in addresses}
if code := country_if_single(codes):
out["country"] = code
return out