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:
1 parent
4c0da58da7
commit
4316624769
42 files changed
+3126
-199
No files matched your search
+24
-16
@@ -21,6 +21,7 @@ from typing import Any
|
||||
|
||||
from desk.sources import strip_html
|
||||
|
||||
from ._contract import Ask, Fields, Place, Reads
|
||||
from ._shared import Get, Page, Row, only, parse_dt
|
||||
|
||||
NAME = "phenom"
|
||||
@@ -34,6 +35,12 @@ PATTERNS = (
|
||||
r"phenompeople\.com|phenom\.com/careers",
|
||||
)
|
||||
|
||||
READS = Reads(
|
||||
scope="board", listing="paged", page_size=100, text="detail", teaser=True,
|
||||
complete="stated", places="many", fields=Fields(posted="trusted", remote="stated"),
|
||||
robots="read: robots.txt allows /<country>/<lang>/search-results (checked 2026-09-29)",
|
||||
)
|
||||
|
||||
#: The page size asked for. 100 is what the site's own search sends; `size`
|
||||
#: 200 was answered in full by Just Eat Takeaway and 500 by Philips (of 865),
|
||||
#: but a page is 340 KB at 100 roles already.
|
||||
@@ -70,10 +77,6 @@ def careers_url(slug: str) -> str:
|
||||
return f"{_root(slug)}/search-results"
|
||||
|
||||
|
||||
def robots_page(slug: str) -> str:
|
||||
return careers_url(slug)
|
||||
|
||||
|
||||
def _body(slug: str, offset: int) -> dict[str, Any]:
|
||||
"""What the site's search page sends for a listing of every role, newest
|
||||
first, less the parts that only tell the page what to draw. `lang` is
|
||||
@@ -99,7 +102,7 @@ def _key(job: dict[str, Any]) -> str:
|
||||
return str(job.get("jobSeqNo") or job.get("jobId") or job.get("reqId") or "").strip()
|
||||
|
||||
|
||||
def page(get: Get, slug: str, cursor: Any) -> Page:
|
||||
def page(get: Get, slug: str, cursor: Any, ask: Ask = Ask()) -> Page:
|
||||
offset = int(cursor or 0)
|
||||
host = _parts(slug)[0]
|
||||
data = json.loads(get(f"https://{host}/widgets", method="POST",
|
||||
@@ -133,10 +136,12 @@ def _slug_of(title: str) -> str:
|
||||
|
||||
def rows(search: dict[str, Any], slug: str) -> list[Row]:
|
||||
"""The roles of one page, `refineSearch.data.jobs`. A role has the title,
|
||||
`jobSeqNo`, `postedDate` (a date at midnight), `category`, the locations
|
||||
as `multi_location` (a list, one per place) beside `location` (the first),
|
||||
and `descriptionTeaser`, the first paragraph of the text; the full text is
|
||||
on the role's page, see `detail`. `applyUrl` points at the apply system
|
||||
`jobSeqNo`, `dateCreated` (the posting) beside `postedDate` (a date at
|
||||
midnight that the site moves when it refreshes a role: King's "12mth FTC"
|
||||
role, created in June, says 28 September), `category`, the locations as
|
||||
`multi_location` (a list, one per place) beside `location` (the first),
|
||||
and `descriptionTeaser`, the first paragraph of the text, kept as `teaser`;
|
||||
the full text is on the role's page, see `detail`. `applyUrl` points at the apply system
|
||||
(Workday for Just Eat Takeaway and Philips), so the role's URL is its page
|
||||
on the site. No remote flag and no pay are in the list."""
|
||||
out = []
|
||||
@@ -145,19 +150,22 @@ def rows(search: dict[str, Any], slug: str) -> list[Row]:
|
||||
title = _text(job.get("title"))
|
||||
if not title or not key:
|
||||
continue
|
||||
places: list[str] = []
|
||||
for place in (*(job.get("multi_location") or []), job.get("location")):
|
||||
if isinstance(place, str) and place.strip() and place.strip() not in places:
|
||||
places.append(place.strip())
|
||||
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})
|
||||
tail = _slug_of(title)
|
||||
out.append({
|
||||
"source_id": key,
|
||||
"title": title,
|
||||
"location": "; ".join(places),
|
||||
"places": places,
|
||||
"location": "; ".join(p["text"] for p in places),
|
||||
"url": f"{_root(slug)}/job/{key}" + (f"/{tail}" if tail else ""),
|
||||
"posted": parse_dt(job.get("postedDate")),
|
||||
"posted": parse_dt(job.get("dateCreated") or job.get("postedDate")),
|
||||
"department": _text(job.get("category")),
|
||||
"description": _plain(job.get("descriptionTeaser")),
|
||||
"description": "",
|
||||
"teaser": _plain(job.get("descriptionTeaser")),
|
||||
"remote": None, # the list does not say
|
||||
"salary_text": "", # nor does it state pay
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user