Share the readers' place, table-lookup and country helpers, unify the employment vocabulary, and list the enrich switch with the stages

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 10:13:24 +02:00
1 parent ca80219bbb
commit 903b69b6d3
34 files changed
+290 -207

No files matched your search

+3 -4
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, is_web_url, only, parse_dt
from ._shared import Get, Page, Row, add_place, country_if_single, is_web_url, only, parse_dt
NAME = "successfactors"
LABEL = "SuccessFactors"
@@ -392,13 +392,12 @@ def detail(get: Get, slug: str, row: Row) -> dict[str, Any]:
addresses = _addresses(text) or [meta]
places: list[Place] = []
for address in addresses:
if (place := _location(address)) and place not in (p["text"] for p in places):
places.append({"text": place, "remote": None})
add_place(places, {"text": _location(address), "remote": None})
if places:
out["places"] = places
out["location"] = "; ".join(p["text"] for p in places)
codes = {_country_code(address) for address in addresses}
if len(codes) == 1 and (code := next(iter(codes))):
if code := country_if_single(codes):
out["country"] = code
return out