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
@@ -16,6 +16,7 @@ from typing import Any
|
||||
|
||||
from desk.sources import strip_html
|
||||
|
||||
from ._contract import Ask, Fields, Place, Reads
|
||||
from ._shared import Get, Page, Row, is_web_url, only, parse_dt
|
||||
|
||||
NAME = "teamtailor"
|
||||
@@ -28,6 +29,12 @@ PATTERNS = (
|
||||
r"cdn\.teamtailor\.com|teamtailor-cdn|teamtailor\.com/assets",
|
||||
)
|
||||
|
||||
READS = Reads(
|
||||
scope="board", listing="paged", page_size=50, text="listing", complete="end",
|
||||
places="many", fields=Fields(posted="trusted", remote="stated"),
|
||||
robots="api: no robots.txt check needed (public board API), 2026-09-30",
|
||||
)
|
||||
|
||||
#: The page size, asked for as `per_page`. A feed with neither parameter
|
||||
#: answers with every role (73 of 73 at Shine, 2026-09-29), but says nowhere
|
||||
#: that it is the whole list, so this reads by page to an empty one;
|
||||
@@ -80,7 +87,7 @@ def probe_ok(body: bytes) -> bool:
|
||||
return b"<item>" in body
|
||||
|
||||
|
||||
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)
|
||||
items = _items(get(f"https://{site(slug)}/jobs.rss?per_page={PAGE_SIZE}&offset={offset}"))
|
||||
results = [{"id": item.findtext("guid") or item.findtext("link") or ""} for item in items]
|
||||
@@ -106,32 +113,36 @@ def rows(items: list[ET.Element], slug: str) -> list[Row]:
|
||||
own domain), a `guid` uuid, `pubDate`, the HTML `description` in full,
|
||||
`remoteStatus` (fully, hybrid, onsite, none or temporary), and, in the
|
||||
`tt:` namespace, `locations` (a list: `city` and `country` each, `name` free
|
||||
text), `department` and `role`, either of which may be empty. `place` joins
|
||||
the distinct locations with "; ", which `country_of` reads a location at a
|
||||
time. No pay is stated anywhere in the feed."""
|
||||
text), `department` and `role`, either of which may be empty. `places` keeps
|
||||
the distinct locations, and `location` joins them with "; ". A place is
|
||||
remote or an office as far as the role's `remoteStatus` says. No pay is
|
||||
stated anywhere in the feed."""
|
||||
out = []
|
||||
for item in items:
|
||||
title = (item.findtext("title") or "").strip()
|
||||
url = (item.findtext("link") or "").strip()
|
||||
if not title or not is_web_url(url):
|
||||
continue
|
||||
places: list[str] = []
|
||||
status = (item.findtext("remoteStatus") or "").strip()
|
||||
remote = {"fully": True, "hybrid": False, "onsite": False}.get(status)
|
||||
places: list[Place] = []
|
||||
for loc in item.findall(f"{_TT}locations/{_TT}location"):
|
||||
city = (loc.findtext(f"{_TT}city") or loc.findtext(f"{_TT}name") or "").strip()
|
||||
country = (loc.findtext(f"{_TT}country") or "").strip()
|
||||
place = city if country == city else ", ".join(p for p in (city, country) if p)
|
||||
if place and place not in places:
|
||||
places.append(place)
|
||||
if place and place not in (p["text"] for p in places):
|
||||
places.append({"text": place, "remote": remote})
|
||||
out.append({
|
||||
"source_id": (item.findtext("guid") or url).strip(),
|
||||
"title": title,
|
||||
"location": "; ".join(places),
|
||||
"places": places,
|
||||
"location": "; ".join(p["text"] for p in places),
|
||||
"url": url,
|
||||
"posted": parse_dt(item.findtext("pubDate")),
|
||||
"department": ((item.findtext(f"{_TT}department") or "").strip()
|
||||
or (item.findtext(f"{_TT}role") or "").strip()),
|
||||
"description": html.unescape(strip_html(item.findtext("description") or "")),
|
||||
"remote": _REMOTE.get((item.findtext("remoteStatus") or "").strip()),
|
||||
"remote": _REMOTE.get(status),
|
||||
"salary_text": "", # Teamtailor's feed states no pay at all
|
||||
})
|
||||
return out
|
||||
Reference in new issue
Block a user