Declare READS for Oracle, Personio, Phenom, Pinpoint, Recruitee, Rippling, SmartRecruiters, SuccessFactors, Teamtailor, Workable and Workday

Every row carries places (Personio additionalOffices, Workable and Recruitee
locations[], every SuccessFactors address, Workday's own read), the list
teaser of Phenom and Oracle is kept in teaser, and the level, employment and
country a host states are mapped. Workday "N Locations" and "Country - City",
and Recruitee "Remote job", are no longer places. Phenom takes dateCreated
as posted. robots_page and ROBOTS_ANY_CASE go; READS.robots records the
decision. Signatures are feed_url(slug, ask) and page(get, slug, cursor, ask),
with an empty Ask as the default so the runner of today still calls them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 09:14:27 +02:00
1 parent 4c0da58da7
commit 4316624769
42 files changed
+3126 -199

No files matched your search

+35 -7
View File
@@ -18,17 +18,27 @@ from __future__ import annotations
import html
import json
import logging
from collections.abc import Callable
from typing import Any
from desk.sources import strip_html
from ._contract import Ask, Fields, Reads
from ._shared import Row, is_web_url, label_slug_ok, num, only, pay_line, yearly_amount
log = logging.getLogger(__name__)
NAME = "pinpoint"
LABEL = "Pinpoint"
PATTERNS = (r"https?://([a-z0-9-]+)\.pinpointhq\.com",)
READS = Reads(
scope="board", listing="whole", text="listing", complete="whole", places="one",
fields=Fields(pay="figures", remote="stated", employment="stated"),
robots="read: robots.txt allows / (checked 2026-09-29)",
)
#: `workplace_type` -> `store._remote`'s words. Anything else says nothing.
_REMOTE = {"onsite": "onsite", "on_site": "onsite", "hybrid": "hybrid", "remote": "remote"}
@@ -41,6 +51,12 @@ _YEARLY = {"annually": 1, "annual": 1, "yearly": 1, "year": 1, "monthly": 12, "m
_PERIOD = {"annually": "year", "annual": "year", "yearly": "year", "monthly": "month",
"weekly": "week", "daily": "day", "hourly": "hour"}
#: What `employment_type` (`permanent_full_time`, `fixed_term_full_time`) says,
#: the first fragment found deciding, so a contract type beats the hours.
_EMPLOYMENT = (("intern", "internship"), ("freelance", "contract"), ("contract", "contract"),
("fixed_term", "temporary"), ("temporary", "temporary"),
("part_time", "part_time"), ("full_time", "full_time"))
#: The sections of a posting's text, in the order the page shows them: the
#: description, then these fields, each with its own heading in `<field>_header`.
_SECTIONS = ("key_responsibilities", "skills_knowledge_expertise", "benefits")
@@ -62,11 +78,7 @@ def careers_url(slug: str) -> str:
return f"https://{host(slug)}/"
def robots_page(slug: str) -> str:
return careers_url(slug)
def feed_url(slug: str) -> str:
def feed_url(slug: str, ask: Ask = Ask()) -> str:
return f"https://{host(slug)}/postings.json"
@@ -100,6 +112,16 @@ def _place(location: dict[str, Any]) -> str:
return ", ".join(parts)
def _employment(code: str) -> str | None:
code = code.strip().lower()
for fragment, value in _EMPLOYMENT:
if fragment in code:
return value
if code:
log.debug("pinpoint: unknown employment_type %r", code)
return None
def _pay(j: dict[str, Any]) -> tuple[int | None, int | None, str, str]:
"""`(salary_min, salary_max, currency, salary_text)` of a posting whose
pay is shown (`compensation_visible`); the free-text `compensation` is the
@@ -132,15 +154,21 @@ def parse(body: bytes, slug: str) -> list[Row]:
continue
job = j.get("job") or {}
low, high, currency, salary_text = _pay(j)
workplace = str(j.get("workplace_type") or "").strip().lower()
place = _place(j.get("location") or {})
out.append({
"source_id": source_id,
"title": title,
"location": _place(j.get("location") or {}),
"places": [{"text": place, "remote": {"remote": True, "onsite": False,
"on_site": False, "hybrid": False}.get(workplace)}]
if place else [],
"location": place,
"url": url,
"posted": None, # only the posting's own page has a date
"department": str((job.get("department") or {}).get("name") or "").strip(),
"description": _text(j),
"remote": _REMOTE.get(str(j.get("workplace_type") or "").strip().lower()),
"remote": _REMOTE.get(workplace),
"employment": _employment(str(j.get("employment_type") or "")),
"salary_text": salary_text,
"salary_min": low,
"salary_max": high,