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
+29
-14
@@ -21,6 +21,7 @@ from urllib.parse import quote
|
||||
|
||||
from desk.sources import strip_html
|
||||
|
||||
from ._contract import Ask, Fields, Place, Reads
|
||||
from ._shared import Get, Page, Row, only, parse_dt
|
||||
|
||||
NAME = "oracle"
|
||||
@@ -38,6 +39,14 @@ PATTERNS = (
|
||||
r"oraclecloud\.(?:com|eu)/hcmUI(?!/CandidateExperience/[A-Za-z_-]+/sites/)",
|
||||
)
|
||||
|
||||
READS = Reads(
|
||||
scope="board", listing="paged", page_size=200, text="detail", teaser=True,
|
||||
complete="stated", places="many",
|
||||
fields=Fields(posted="trusted", remote="stated", country="stated"),
|
||||
robots=("read: robots.txt allows /hcmUI/CandidateExperience/en/sites/<site>/jobs "
|
||||
"(checked 2026-09-29)"),
|
||||
)
|
||||
|
||||
#: The page size asked for. 200 was answered in full by Nokia (600 roles in
|
||||
#: three calls of about 360 KB, 2026-09-29); the cursor advances by what a page
|
||||
#: returned, so a tenant that caps `limit` lower would not skip a role.
|
||||
@@ -77,15 +86,11 @@ def careers_url(slug: str) -> str:
|
||||
return f"{_base(slug)}/jobs"
|
||||
|
||||
|
||||
def robots_page(slug: str) -> str:
|
||||
return careers_url(slug)
|
||||
|
||||
|
||||
def _api(slug: str) -> str:
|
||||
return f"https://{_parts(slug)[0]}/hcmRestApi/resources/latest"
|
||||
|
||||
|
||||
def page(get: Get, slug: str, cursor: Any) -> Page:
|
||||
def page(get: Get, slug: str, cursor: Any, ask: Ask = Ask()) -> Page:
|
||||
"""One page of `recruitingCEJobRequisitions`. The answer's outer `count`,
|
||||
`hasMore` and `limit` describe the one search wrapper in `items`, so the
|
||||
total (`TotalJobsCount`) and the roles (`requisitionList`) are read from
|
||||
@@ -135,22 +140,32 @@ def rows(search: dict[str, Any], slug: str) -> list[Row]:
|
||||
# The id goes into a URL, and a listing is external content.
|
||||
if not title or not re.fullmatch(r"[A-Za-z0-9_-]+", role_id):
|
||||
continue
|
||||
places: list[str] = []
|
||||
for name in (_text(role.get("PrimaryLocation")),
|
||||
*(_text(s.get("Name")) for s in role.get("secondaryLocations") or []
|
||||
if isinstance(s, dict))):
|
||||
if name and name not in places:
|
||||
places.append(name)
|
||||
remote = _REMOTE.get(_text(role.get("WorkplaceTypeCode")).lower())
|
||||
places: list[Place] = []
|
||||
codes: set[str] = set()
|
||||
secondary = [s for s in role.get("secondaryLocations") or [] if isinstance(s, dict)]
|
||||
for name, code in ((_text(role.get("PrimaryLocation")),
|
||||
_text(role.get("PrimaryLocationCountry"))),
|
||||
*((_text(s.get("Name")), _text(s.get("CountryCode")))
|
||||
for s in secondary)):
|
||||
if name and name not in (p["text"] for p in places):
|
||||
places.append({"text": name, "remote": {"remote": True, "hybrid": False,
|
||||
"onsite": False}.get(remote or "")})
|
||||
if code:
|
||||
codes.add(code.upper())
|
||||
out.append({
|
||||
"source_id": role_id,
|
||||
"title": title,
|
||||
"location": "; ".join(places),
|
||||
"places": places,
|
||||
"location": "; ".join(p["text"] for p in places),
|
||||
"url": f"{_base(slug)}/job/{role_id}",
|
||||
"posted": parse_dt(role.get("PostedDate")),
|
||||
"department": (_text(role.get("JobFamily")) or _text(role.get("JobFunction"))
|
||||
or _text(role.get("Department")) or _text(role.get("Organization"))),
|
||||
"description": _plain(role.get("ShortDescriptionStr")),
|
||||
"remote": _REMOTE.get(_text(role.get("WorkplaceTypeCode")).lower()),
|
||||
"description": "",
|
||||
"teaser": _plain(role.get("ShortDescriptionStr")),
|
||||
"country": next(iter(codes)) if len(codes) == 1 else None,
|
||||
"remote": remote,
|
||||
"salary_text": "", # the resource states no pay
|
||||
})
|
||||
return out
|
||||
|
||||
Reference in new issue
Block a user