Extract employment_type for gilariver, usajobs; fix hrsa company parsing

- gilariver: parse employment type from subtitle "Location | Category | Active - Full Time"
- usajobs: add salary_text and employment_type selectors to YAML
- hrsa: filter <br> elements from td children to fix company/employment_type index offset

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
I Luk Kim 5 months ago
parent 72bcffad7f
commit 22a0c6dbdc

@ -60,14 +60,19 @@ class GilaRiverAdapter(ManifestDrivenAdapter):
if not self._matches_keywords(title): if not self._matches_keywords(title):
continue continue
# Subtitle: "Location | Category | Status - Employment Type" # Subtitle: "Location | Category | Active - Employment Type"
parts = [p.strip() for p in item["subtitle"].split("|")] parts = [p.strip() for p in item["subtitle"].split("|")]
location = parts[0] if parts else None location = parts[0] if parts else None
# "Active - Full Time" → "Full Time"
employment_type = None
if len(parts) >= 3 and " - " in parts[2]:
employment_type = parts[2].split(" - ", 1)[-1].strip() or None
cards.append(RawJobCard( cards.append(RawJobCard(
title=title, title=title,
company="Gila River Health Care", company="Gila River Health Care",
location=location or None, location=location or None,
employment_type=employment_type,
posted_text=item["posted"] or None, posted_text=item["posted"] or None,
url=item["url"] or None, url=item["url"] or None,
)) ))

@ -75,8 +75,11 @@ class HRSAConnectorAdapter(ManifestDrivenAdapter):
const cell1 = cells[0]; const cell1 = cells[0];
const cell2 = cells[1]; const cell2 = cells[1];
const c1kids = cell1 ? Array.from(cell1.children) : []; // Filter out <br> elements they appear between spans and shift indices
// c1kids[0] = list (title link + specialty) const c1kids = cell1
? Array.from(cell1.children).filter(el => el.tagName !== 'BR')
: [];
// c1kids[0] = ul (title link + specialty)
// c1kids[1] = "Job" // c1kids[1] = "Job"
// c1kids[2] = employment type (Full-Time / Part-Time) // c1kids[2] = employment type (Full-Time / Part-Time)
// c1kids[3] = site/company name // c1kids[3] = site/company name

@ -41,6 +41,12 @@ extract:
location: location:
text: text:
- "div:nth-child(2) div:first-child p:nth-child(3)" - "div:nth-child(2) div:first-child p:nth-child(3)"
salary_text:
text:
- "div:nth-child(2) div:nth-child(2) p:nth-child(1)"
employment_type:
text:
- "div:nth-child(2) div:nth-child(2) p:nth-child(2)"
posted_text: posted_text:
text: text:
- ".italic" - ".italic"

Loading…
Cancel
Save