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:
1 parent
ca80219bbb
commit
903b69b6d3
34 files changed
+290
-207
No files matched your search
@@ -31,7 +31,7 @@ from desk.sources import strip_html
|
||||
|
||||
from ._contract import Ask, Fields, Filters, Place, Reads
|
||||
from ._countries import name_of
|
||||
from ._shared import Get, Page, Row, only, parse_dt
|
||||
from ._shared import Get, Page, Row, add_place, only, parse_dt
|
||||
|
||||
NAME = "phenom"
|
||||
LABEL = "Phenom"
|
||||
@@ -163,10 +163,9 @@ def rows(search: dict[str, Any], slug: str) -> list[Row]:
|
||||
if not title or not key:
|
||||
continue
|
||||
places: list[Place] = []
|
||||
for place in (job.get("location"), *(job.get("multi_location") or [])):
|
||||
if isinstance(place, str) and place.strip() \
|
||||
and place.strip() not in (p["text"] for p in places):
|
||||
places.append({"text": place.strip(), "remote": None})
|
||||
for text in (job.get("location"), *(job.get("multi_location") or [])):
|
||||
if isinstance(text, str):
|
||||
add_place(places, {"text": text.strip(), "remote": None})
|
||||
tail = _slug_of(title)
|
||||
out.append({
|
||||
"source_id": key,
|
||||
|
||||
Reference in new issue
Block a user