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:
1 parent
a66aac95cf
commit
06eb929eaf
48 files changed
+460
-388
No files matched your search
@@ -7,8 +7,8 @@ Checked live on 2026-09-29 and 2026-09-30, moved here from `plugins/search.py`.
|
||||
above 2000 is refused, so a search reads 2,100 results at most. It states
|
||||
`total`. A hit has the whole ad's text, so the list has the full text. An ad
|
||||
may name several workplaces: `workplace_addresses` holds one entry each, and
|
||||
every one is a place of the role. `workplace_model` is mostly empty, so
|
||||
`remote` comes from the headline and the model together.
|
||||
every one is a place of the role. `workplace_model` is mostly empty; its
|
||||
label is passed on as `remote`, in the host's words.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -22,7 +22,7 @@ from urllib.parse import urlencode
|
||||
from desk.sources import strip_html
|
||||
|
||||
from ._contract import Ask, Fields, Filters, Place, Reads
|
||||
from ._shared import Get, Page, Row, is_web_url, only, parse_dt, remote_word
|
||||
from ._shared import Get, Page, Row, is_web_url, only, parse_dt
|
||||
|
||||
NAME = "platsbanken"
|
||||
LABEL = "Platsbanken"
|
||||
@@ -113,7 +113,7 @@ def rows(decoded: Any, slug: str) -> list[Row]:
|
||||
addresses = hit.get("workplace_addresses") or [hit.get("workplace_address") or {}]
|
||||
places = [place for address in addresses if isinstance(address, dict)
|
||||
if (place := _place(address))]
|
||||
model = (hit.get("workplace_model") or {}).get("label") or ""
|
||||
model = str((hit.get("workplace_model") or {}).get("label") or "").strip()
|
||||
out.append({
|
||||
"source_id": str(hit.get("id") or ""),
|
||||
"title": title,
|
||||
@@ -122,7 +122,7 @@ def rows(decoded: Any, slug: str) -> list[Row]:
|
||||
"places": places,
|
||||
"location": places[0]["text"] if places else "",
|
||||
"country": "SE",
|
||||
"remote": remote_word(f"{title} {model}"),
|
||||
"remote": model or None,
|
||||
"posted": parse_dt(hit.get("publication_date")),
|
||||
"description": _text((hit.get("description") or {}).get("text") or ""),
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user