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
@@ -7,18 +7,42 @@ Personio.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import xml.etree.ElementTree as ET
|
||||
from collections.abc import Callable
|
||||
|
||||
from desk.sources import strip_html
|
||||
|
||||
from ._contract import Ask, Fields, Place, Reads
|
||||
from ._shared import Row, label_slug_ok, num, only, parse_dt, pay_line, yearly_amount
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
NAME = "personio"
|
||||
LABEL = "Personio"
|
||||
RANK = 70
|
||||
PATTERNS = (r"https?://([a-z0-9-]+)\.jobs\.personio\.(?:de|com)",)
|
||||
|
||||
READS = Reads(
|
||||
scope="board", listing="whole", text="listing", complete="whole",
|
||||
places="many",
|
||||
fields=Fields(pay="figures", posted="trusted", seniority="stated", employment="stated"),
|
||||
robots="api: no robots.txt check needed (public board API), 2026-09-30",
|
||||
)
|
||||
|
||||
#: `seniority` -> the app's levels. `experienced` is what most roles say and
|
||||
#: names no level, so it is known and maps to none; a word not listed is
|
||||
#: logged at debug level so the table can grow.
|
||||
_SENIORITY = {"entry-level": "junior", "student": "intern", "executive": "exec",
|
||||
"experienced": ""}
|
||||
|
||||
#: `employmentType` when it is not the usual permanent contract, to the app's
|
||||
#: employment words; `permanent` says nothing about the hours, so `schedule`
|
||||
#: decides then.
|
||||
_CONTRACT = {"temporary": "temporary", "freelance": "contract", "intern": "internship",
|
||||
"working_student": "internship", "trainee": "internship"}
|
||||
_SCHEDULE = {"full-time": "full_time", "part-time": "part_time"}
|
||||
|
||||
#: Personio's `salaryInformation/type` spellings, to the plain period word
|
||||
#: `pay_line` wants ("yearly" -> "year"). Anything else is passed through.
|
||||
_PERIODS = {"yearly": "year", "monthly": "month", "hourly": "hour",
|
||||
@@ -39,7 +63,7 @@ def careers_url(slug: str) -> str:
|
||||
return f"https://{slug}.jobs.personio.de"
|
||||
|
||||
|
||||
def feed_url(slug: str) -> str:
|
||||
def feed_url(slug: str, ask: Ask = Ask()) -> str:
|
||||
return f"https://{slug}.jobs.personio.de/xml"
|
||||
|
||||
|
||||
@@ -61,10 +85,46 @@ def _salary_text(salary_info: ET.Element) -> str:
|
||||
salary_info.findtext("currencyCode"), period)
|
||||
|
||||
|
||||
def _seniority(word: str) -> str | None:
|
||||
key = word.strip().lower()
|
||||
if key not in _SENIORITY:
|
||||
if key:
|
||||
log.debug("personio: unknown seniority %r", word)
|
||||
return None
|
||||
return _SENIORITY[key] or None
|
||||
|
||||
|
||||
def _employment(position: ET.Element) -> str | None:
|
||||
contract = (position.findtext("employmentType") or "").strip().lower()
|
||||
schedule = (position.findtext("schedule") or "").strip().lower()
|
||||
if contract in _CONTRACT:
|
||||
return _CONTRACT[contract]
|
||||
if contract and contract != "permanent":
|
||||
log.debug("personio: unknown employmentType %r", contract)
|
||||
return _SCHEDULE.get(schedule)
|
||||
|
||||
|
||||
def _places(position: ET.Element) -> list[Place]:
|
||||
"""The `office` and every `additionalOffices/office`, each once. The feed
|
||||
has no remote flag; an office named "Remote" or "Berlin (Remote)" is
|
||||
remote, any other says nothing."""
|
||||
found: list[Place] = []
|
||||
names = [position.findtext("office"),
|
||||
*(o.text for o in position.findall("additionalOffices/office"))]
|
||||
for name in names:
|
||||
text = (name or "").strip()
|
||||
if text and text not in (p["text"] for p in found):
|
||||
found.append({"text": text, "remote": True if "remote" in text.lower() else None})
|
||||
return found
|
||||
|
||||
|
||||
def parse(body: bytes, slug: str) -> list[Row]:
|
||||
"""`{slug}.jobs.personio.de/xml` -> `<workzag-jobs><position>...`. No job
|
||||
URL in the feed itself; Personio's own page is `/job/{id}`, confirmed
|
||||
live against a real posting (2026-09-23)."""
|
||||
live against a real posting (2026-09-23). `additionalOffices` lists the
|
||||
other places of a role (116 of 320 at the three boards read); `seniority`
|
||||
is one of entry-level, experienced, executive, student, and `schedule` and
|
||||
`employmentType` state the hours and the contract."""
|
||||
root = ET.fromstring(body)
|
||||
rows = []
|
||||
for position in root.findall("position"):
|
||||
@@ -84,15 +144,19 @@ def parse(body: bytes, slug: str) -> list[Row]:
|
||||
salary_info.findtext("currencyCode"), salary_info.findtext("type"),
|
||||
{"yearly": 1, "monthly": 12})
|
||||
salary_text = _salary_text(salary_info)
|
||||
places = _places(position)
|
||||
rows.append({
|
||||
"source_id": job_id,
|
||||
"title": title,
|
||||
"location": (position.findtext("office") or "").strip(),
|
||||
"places": places,
|
||||
"location": "; ".join(p["text"] for p in places),
|
||||
"url": f"https://{slug}.jobs.personio.de/job/{job_id}",
|
||||
"posted": parse_dt(position.findtext("createdAt")),
|
||||
"department": (position.findtext("department") or "").strip(),
|
||||
"description": strip_html(description),
|
||||
"remote": "remote" in (position.findtext("office") or "").lower() or None,
|
||||
"remote": any(p["remote"] for p in places) or None,
|
||||
"seniority": _seniority(position.findtext("seniority") or ""),
|
||||
"employment": _employment(position),
|
||||
"salary_text": salary_text,
|
||||
"salary_min": salary_min,
|
||||
"salary_max": salary_max,
|
||||
|
||||
Reference in new issue
Block a user