Readers ashby to lever 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
6c7ce1090d
37 files changed
+504
-171
No files matched your search
@@ -38,7 +38,7 @@ from typing import Any
|
||||
from desk.sources import strip_html
|
||||
|
||||
from ._contract import Ask, Fields, Place, Reads, Row
|
||||
from ._shared import Get, Page, add_place, only, parse_dt, place, table_word
|
||||
from ._shared import Get, Page, add_place, only, parse_dt, place
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -49,11 +49,6 @@ READS = Reads(
|
||||
robots="read: robots.txt allows /jobs, with crawl-delay 5 not honoured (checked 2026-09-29)",
|
||||
)
|
||||
|
||||
#: `employment_type` -> the app's employment words.
|
||||
_EMPLOYMENT = {"full_time": "full_time", "part_time": "part_time", "contractor": "contract",
|
||||
"contract": "contract", "temporary": "temporary", "intern": "internship",
|
||||
"internship": "internship", "freelance": "freelance"}
|
||||
|
||||
NAME = "jibe"
|
||||
LABEL = "Jibe"
|
||||
PATTERNS = (
|
||||
@@ -157,10 +152,10 @@ def rows(data: dict[str, Any], slug: str) -> list[Row]:
|
||||
}
|
||||
# One code, for a role at one place: over several countries it would
|
||||
# gate the others by the site's own.
|
||||
code = str(j.get("country_code") or "").strip().upper()
|
||||
if len(places) == 1 and re.fullmatch(r"[A-Z]{2}", code):
|
||||
code = str(j.get("country_code") or "").strip()
|
||||
if len(places) == 1 and code:
|
||||
row["country"] = code
|
||||
if employment := table_word(_EMPLOYMENT, j.get("employment_type"), log, "employment_type"):
|
||||
if employment := str(j.get("employment_type") or "").strip():
|
||||
row["employment"] = employment
|
||||
out.append(row)
|
||||
return out
|
||||
Reference in new issue
Block a user