You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.1 KiB
Python

"""Southern Orthodontic Partners adapter — Paylocity platform, single page."""
from __future__ import annotations
from loguru import logger
from gimme_job.adapters.base import ManifestDrivenAdapter
from gimme_job.adapters.registry import register
from gimme_job.models.dto import JobPostingCandidate, RawJobCard
@register("southernortho")
class SouthernOrthoAdapter(ManifestDrivenAdapter):
_BASE_URL = "https://recruiting.paylocity.com"
def collect_cards(self, page, manifest):
try:
page.wait_for_selector(".job-listing-job-item", timeout=12000, state="attached")
except Exception:
logger.debug("[southernortho] Results wait timed out — may be zero results")
return super().collect_cards(page, manifest)
def normalize(self, raw: RawJobCard) -> JobPostingCandidate:
candidate = super().normalize(raw)
if candidate.job_url and candidate.job_url.startswith("/"):
candidate.job_url = self._BASE_URL + candidate.job_url
if candidate.posted_text:
candidate.posted_text = candidate.posted_text.replace(" - ", "").strip()
return candidate