Add the freehire search reader: tech roles of many countries with full text, yearly pay and work mode
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
018a1ad895
commit
59e43f18b7
3 files changed
+862
No files matched your search
@@ -0,0 +1,190 @@
|
||||
"""freehire: an open aggregator of IT jobs crawled from about 50 hosts (company
|
||||
boards, Jobnet, The Hub and others), through its public JSON API at
|
||||
freehire.me/api/v1; no key.
|
||||
|
||||
Checked live on 2026-10-03. The search is `/agent/jobs/search`, whose hits
|
||||
carry the full description (`description_format=html`), at 300 requests a
|
||||
minute; `limit` is at most 100 and `offset + limit` at most 10,000, so a
|
||||
search reads 10,000 results at most. `meta.total` is the count. `countries`
|
||||
(lower-case ISO codes) and `work_mode` repeat in the query; several
|
||||
countries are one request, so `country` is a `many` filter. `q` is noisy:
|
||||
unquoted words are OR over title, company, text and place, so a search is
|
||||
narrowed by `country` and a few distinctive words. A hit's `source` names
|
||||
where freehire crawled it (`greenhouse`, `jobnet`, `whatjobs-dk`); it is kept
|
||||
in `raw`, since a role freehire took from a board roledesk reads is a copy
|
||||
of that board's role. `url` carries `utm_source=freehire.me`, which is
|
||||
removed.
|
||||
|
||||
A hit states `cities` (canonical names, at times those of other sites of
|
||||
the employer) and `location`, the posting's own words; every one of them is
|
||||
a place of the role. `enrichment` is model-extracted and may state
|
||||
`salary_min`, `salary_max`, `salary_currency` and `salary_period`; only a
|
||||
yearly figure goes to the pay columns, the other periods are said in
|
||||
`salary_text`. `enrichment` also has `seniority` and `employment_type`,
|
||||
which this reader does not hand on yet: a reader that states them needs a
|
||||
table of the host's words in `app/prep/hosts/freehire.py`.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import re
|
||||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
from urllib.parse import urlencode, urlsplit, urlunsplit
|
||||
|
||||
from desk.sources import USER_AGENT
|
||||
|
||||
from ._contract import Ask, Fields, Filters, Place, Reads
|
||||
from ._shared import (Get, Page, Row, html_text, is_web_url, num, only, parse_dt, pay_line,
|
||||
yearly_amount)
|
||||
|
||||
NAME = "freehire"
|
||||
LABEL = "freehire (tech, many countries)"
|
||||
RANK = 40
|
||||
|
||||
READS = Reads(
|
||||
scope="search", listing="paged", page_size=100, ceiling=10000,
|
||||
text="listing", complete="stated",
|
||||
filters=Filters(query="one", country="many", remote="one"),
|
||||
places="many",
|
||||
fields=Fields(pay="figures", posted="trusted", remote="stated", country="stated"),
|
||||
robots="read: robots.txt allows / for every agent; its Disallow of /api/ is for "
|
||||
"Googlebot and Bingbot only, and its comments invite API use with a "
|
||||
"descriptive User-Agent (checked 2026-10-03)")
|
||||
|
||||
#: Saved param -> the filter dimension it fills.
|
||||
PARAMS = {"q": "query", "country": "country", "remote": "remote"}
|
||||
|
||||
SEARCH = "https://freehire.me/api/v1/agent/jobs/search"
|
||||
|
||||
#: `work_mode` of freehire's facets, for the form: value -> label. "" is any.
|
||||
MODES: dict[str, str] = {"remote": "Remote", "hybrid": "Hybrid", "onsite": "On site"}
|
||||
|
||||
_CODE = re.compile(r"[a-z]{2}")
|
||||
|
||||
|
||||
def allowed(slug: str) -> Callable[[str], bool]:
|
||||
return only("freehire.me")
|
||||
|
||||
|
||||
def _codes(value: Any) -> list[str]:
|
||||
"""Country codes from a comma-separated string or a list, lower-case, one
|
||||
of each in the order given; a ValueError for anything but two letters."""
|
||||
items = value if isinstance(value, list | tuple | set) else [value]
|
||||
out: list[str] = []
|
||||
for item in items:
|
||||
for code in str(item or "").replace(" ", ",").lower().split(","):
|
||||
if code and code not in out:
|
||||
if not _CODE.fullmatch(code):
|
||||
raise ValueError(f"country is empty or ISO codes like dk,se, not {code!r}")
|
||||
out.append(code)
|
||||
return out
|
||||
|
||||
|
||||
def _mode(value: Any) -> str:
|
||||
mode = str(value or "").strip().lower()
|
||||
if mode and mode not in MODES:
|
||||
raise ValueError(f"remote is empty or one of {', '.join(MODES)}")
|
||||
return mode
|
||||
|
||||
|
||||
def clean_params(params: dict[str, Any]) -> dict[str, Any]:
|
||||
"""The saved params of a search: `q`, `country` as a comma-separated list
|
||||
of ISO codes (empty for all countries) and `remote`, one of `MODES` or
|
||||
empty for any."""
|
||||
return {"q": params["q"], "country": ",".join(_codes(params.get("country"))),
|
||||
"remote": _mode(params.get("remote"))}
|
||||
|
||||
|
||||
def page(get: Get, slug: str, cursor: Any, ask: Ask) -> Page:
|
||||
"""One page of a search, newest first; the cursor is the offset. The next
|
||||
page follows a full page while its end is within the ceiling. The
|
||||
countries are the ask's or the saved param's (a comma-separated string
|
||||
reaches `Ask.countries` as one value), the work mode the saved param's or
|
||||
`remote` of the ask."""
|
||||
countries = _codes(list(ask.countries) or ask.params.get("country"))
|
||||
mode = _mode(ask.params.get("remote")) or ("remote" if ask.remote else "")
|
||||
size, ceiling = READS.page_size or 100, READS.ceiling or 10000
|
||||
offset = int(cursor or 0)
|
||||
query: list[tuple[str, Any]] = [
|
||||
("limit", size), ("offset", offset), ("sort", "posted_at"), ("order", "desc"),
|
||||
("description_format", "html")]
|
||||
if text := ask.query or str(ask.params.get("q") or "").strip():
|
||||
query.append(("q", text))
|
||||
query += [("countries", code) for code in countries]
|
||||
if mode:
|
||||
query.append(("work_mode", mode))
|
||||
body = get(SEARCH + "?" + urlencode(query),
|
||||
headers={"User-Agent": f"roledesk/jobboard ({USER_AGENT})"})
|
||||
data = json.loads(body)
|
||||
hits = [hit for hit in data.get("data") or [] if isinstance(hit, dict)]
|
||||
total = (data.get("meta") or {}).get("total")
|
||||
more = len(hits) >= size and offset + 2 * size <= ceiling
|
||||
return (data, [{"id": str(hit.get("public_slug") or "")} for hit in hits],
|
||||
total if isinstance(total, int) and not isinstance(total, bool) else None,
|
||||
offset + size if more else None)
|
||||
|
||||
|
||||
def _url(url: str) -> str:
|
||||
"""`url` without freehire's `utm_source` parameter, the rest verbatim."""
|
||||
parts = urlsplit(url.strip())
|
||||
query = "&".join(item for item in parts.query.split("&")
|
||||
if item and not item.startswith("utm_source="))
|
||||
return urlunsplit(parts._replace(query=query))
|
||||
|
||||
|
||||
def _places(hit: dict[str, Any], mode: str) -> list[Place]:
|
||||
"""The posting's own `location`, then each canonical city it does not
|
||||
already name. A remote role's places are remote, an on-site one's offices;
|
||||
a hybrid role's say nothing."""
|
||||
remote = {"remote": True, "onsite": False}.get(mode)
|
||||
location = str(hit.get("location") or "").strip()
|
||||
found = [location] if location else []
|
||||
for city in hit.get("cities") or []:
|
||||
city = str(city or "").strip()
|
||||
if city and not any(city.casefold() in text.casefold() for text in found):
|
||||
found.append(city)
|
||||
return [{"text": text, "remote": remote} for text in found]
|
||||
|
||||
|
||||
def _pay(enrichment: dict[str, Any]) -> dict[str, Any]:
|
||||
"""Pay from the model-extracted `enrichment`: yearly figures when
|
||||
`salary_period` is a year, whatever the period a line that says it."""
|
||||
low, high = num(enrichment.get("salary_min")), num(enrichment.get("salary_max"))
|
||||
currency = enrichment.get("salary_currency")
|
||||
period = str(enrichment.get("salary_period") or "").strip().lower()
|
||||
out: dict[str, Any] = {}
|
||||
if period and (line := pay_line(low, high, currency, period)):
|
||||
out["salary_text"] = line
|
||||
lo, hi, code = yearly_amount(low, high, currency, period, {"year": 1})
|
||||
if code:
|
||||
out |= {"salary_min": lo, "salary_max": hi, "currency": code}
|
||||
return out
|
||||
|
||||
|
||||
def rows(decoded: Any, slug: str) -> list[Row]:
|
||||
out: list[Row] = []
|
||||
for hit in decoded.get("data") or []:
|
||||
title = " ".join(str(hit.get("title") or "").split())
|
||||
source_id = str(hit.get("public_slug") or "").strip()
|
||||
url = _url(str(hit.get("url") or ""))
|
||||
if not title or not source_id or not is_web_url(url):
|
||||
continue
|
||||
mode = str(hit.get("work_mode") or "").strip()
|
||||
places = _places(hit, mode)
|
||||
countries = [str(c) for c in hit.get("countries") or [] if c]
|
||||
out.append({
|
||||
"source_id": source_id,
|
||||
"title": title,
|
||||
"company": str(hit.get("company") or "").strip(),
|
||||
"url": url,
|
||||
"places": places,
|
||||
"location": places[0]["text"] if places else "",
|
||||
"country": countries[0].upper() if len(countries) == 1 else "",
|
||||
"remote": mode or None,
|
||||
"posted": parse_dt(hit.get("posted_at")),
|
||||
"description": html_text(hit.get("description")),
|
||||
"source": str(hit.get("source") or ""),
|
||||
} | _pay(hit.get("enrichment") or {}))
|
||||
return out
|
||||
+455
@@ -0,0 +1,455 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"public_slug": "data-engineer-zeta-global-6wuisyj5",
|
||||
"source": "greenhouse",
|
||||
"manually_added": false,
|
||||
"external_id": "zetaglobal:6189408004",
|
||||
"url": "https://job-boards.greenhouse.io/zetaglobal/jobs/6189408004?utm_source=freehire.me",
|
||||
"title": "Data Engineer",
|
||||
"company": "Zeta Global",
|
||||
"company_slug": "zeta-global",
|
||||
"location": "Copenhagen, Denmark",
|
||||
"description": "**Who are we?**\n\nZeta Global is seeking a talented and versatile Data Engineer to join our Data Exchange team within our highly skilled development office in Copenhagen. This team plays a critical role in developing and deploying Zeta’s next-generation data science and engineering technology, collaborating closely with our global teams in the US, Europe, India and Philippines. The Copenhagen office boasts a dynamic and focused environment, comprising a core group of start-up veterans and approximately 30 highly skilled professionals.\n\nAs a member of the Data Exchange team, you will contribute to the analysis, development, and maintenance of our complex data infrastructure, a sophisticated ecosystem of interconnected systems. This team tackles a continuous stream of challenging projects originating from across the organization, demanding a high degree of expertise and innovation. We are seeking candidates with a strong foundation in data engineering, data analysis, and software development principles, and a demonstrated interest in exploring the intersections between these disciplines",
|
||||
"countries": [
|
||||
"de",
|
||||
"dk",
|
||||
"gb"
|
||||
],
|
||||
"regions": [
|
||||
"eu",
|
||||
"uk"
|
||||
],
|
||||
"skills": [
|
||||
"agile",
|
||||
"ai",
|
||||
"airflow",
|
||||
"athena",
|
||||
"aws",
|
||||
"ci-cd",
|
||||
"cloud",
|
||||
"data-engineering",
|
||||
"data-modeling",
|
||||
"data-pipelines",
|
||||
"data-science",
|
||||
"data-warehousing",
|
||||
"etl",
|
||||
"fine-tuning",
|
||||
"machine-learning",
|
||||
"oop",
|
||||
"prototyping",
|
||||
"python",
|
||||
"s3",
|
||||
"scala",
|
||||
"spark",
|
||||
"workflow-orchestration"
|
||||
],
|
||||
"cities": [
|
||||
"Berlin",
|
||||
"Copenhagen",
|
||||
"London"
|
||||
],
|
||||
"collections": [],
|
||||
"is_tech": "tech",
|
||||
"auto_apply_available": true,
|
||||
"posted_at": "2026-10-02T22:53:12Z",
|
||||
"created_at": "2026-09-16T13:50:29Z",
|
||||
"updated_at": "2026-10-03T02:11:19Z",
|
||||
"last_seen_at": "2026-10-03T02:11:19Z",
|
||||
"closed_at": null,
|
||||
"enrichment": {
|
||||
"summary": "Data Engineer joining Zeta Global's Data Exchange team in Copenhagen to analyze, build, and maintain the data infrastructure behind its marketing data platform. Day-to-day work covers analysis, prototyping, and development of data pipelines and ETL using Python/Scala, Spark, Airflow, and AWS.",
|
||||
"employment_type": "full_time",
|
||||
"education_level": "master",
|
||||
"category": "data_engineering",
|
||||
"domains": [
|
||||
"adtech"
|
||||
],
|
||||
"posting_language": "en",
|
||||
"company_type": "product"
|
||||
},
|
||||
"enriched_at": "2026-09-21T18:11:55Z",
|
||||
"enrichment_version": 2,
|
||||
"view_count": 15,
|
||||
"applied_count": 0,
|
||||
"upvote_count": 0,
|
||||
"downvote_count": 0,
|
||||
"my_vote": 0,
|
||||
"reality": {
|
||||
"class": "stale",
|
||||
"age_days": 16,
|
||||
"repost_count": 1,
|
||||
"mass_posting_count": 1,
|
||||
"fake_freshness": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"public_slug": "senior-data-engineer-bi-professional-novo-nordisk-o4ndehjf",
|
||||
"source": "successfactors",
|
||||
"manually_added": false,
|
||||
"external_id": "careers.novonordisk.com:1439582433",
|
||||
"url": "https://careers.novonordisk.com/job/M%C3%A5l%C3%B8v-Senior-Data-Engineer-&-BI-Professional-Capi/1439582433/?utm_source=freehire.me",
|
||||
"title": "Senior Data Engineer & BI Professional",
|
||||
"company": "Novo Nordisk",
|
||||
"company_slug": "novo-nordisk",
|
||||
"location": "",
|
||||
"description": "\n <span><p><span>Job description</span></p>\n<p> </p>\n<p><strong>Location</strong></p>\n<p>Måløv, Denmark</p>\n<p> </p>\n<p> </p>\n<p><strong>Job category</strong></p>\n<p><span>Digital & IT</span></p>\n<p> </p>\n<p><strong>Department</strong></p>\n<p>CS Digital Solutions, Clinical Supplies, CMC Product and Process Development</p>\n<p> </p>\n<p> </p>\n<p><strong>Location</strong></p>\n<p>Måløv, Denmark. This is a temporary position for 12 months.</p>\n<p> </p>\n<p> </p>\n<p><strong>Your impact begins here</strong></p>\n<p>As Senior Data Engineer & BI Professional, you will help build the next generation of data and analytics capabilities for Clinical Supplies. You will design scalable data products on Databricks and shape a modern, AI-enabled approach to business intelligence. Your work directly supports the planning, packing and distribution of clinical trial supplies to patients in more than 50 countries, helping critical trials run smoothly and on time.</p>\n<p> </p>\n<p> </p>\n<p><strong>What you'll bring</strong></p>",
|
||||
"countries": [
|
||||
"dk"
|
||||
],
|
||||
"regions": [
|
||||
"eu"
|
||||
],
|
||||
"skills": [
|
||||
"ai",
|
||||
"alteryx",
|
||||
"analytics",
|
||||
"automation",
|
||||
"aws",
|
||||
"azure",
|
||||
"ci-cd",
|
||||
"cloud",
|
||||
"data-engineering",
|
||||
"data-governance",
|
||||
"data-pipelines",
|
||||
"data-science",
|
||||
"databricks",
|
||||
"delta-lake",
|
||||
"gcp",
|
||||
"infrastructure-as-code",
|
||||
"powerbi",
|
||||
"pyspark",
|
||||
"python",
|
||||
"spark",
|
||||
"sql",
|
||||
"tableau"
|
||||
],
|
||||
"cities": [
|
||||
"Måløv"
|
||||
],
|
||||
"collections": [],
|
||||
"is_tech": "tech",
|
||||
"posted_at": "2026-09-26T00:00:00Z",
|
||||
"created_at": "2026-09-23T00:52:13Z",
|
||||
"updated_at": "2026-09-27T05:12:59Z",
|
||||
"last_seen_at": "2026-10-03T06:30:10Z",
|
||||
"closed_at": null,
|
||||
"enrichment": {
|
||||
"summary": "Senior data engineer & BI professional at Novo Nordisk's Clinical Supplies team in Måløv, Denmark, building scalable data products and pipelines on Databricks and driving the migration from Alteryx, Power BI and Tableau to a modern, AI-enabled BI architecture. Core stack: Databricks, Python, PySpark, SQL and cloud platforms.",
|
||||
"employment_type": "contract",
|
||||
"salary_min": 651000,
|
||||
"salary_max": 956900,
|
||||
"salary_currency": "DKK",
|
||||
"salary_period": "year",
|
||||
"seniority": "senior",
|
||||
"category": "data_engineering",
|
||||
"domains": [
|
||||
"healthcare"
|
||||
],
|
||||
"posting_language": "en",
|
||||
"company_type": "inhouse"
|
||||
},
|
||||
"enriched_at": "2026-09-27T05:12:59Z",
|
||||
"enrichment_version": 2,
|
||||
"view_count": 8,
|
||||
"applied_count": 0,
|
||||
"upvote_count": 0,
|
||||
"downvote_count": 0,
|
||||
"my_vote": 0,
|
||||
"reality": {
|
||||
"class": "fresh",
|
||||
"age_days": 10,
|
||||
"repost_count": 1,
|
||||
"mass_posting_count": 1,
|
||||
"fake_freshness": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"public_slug": "head-of-operations-multi-branch-restaurants-jobgether-o5y4dcrn",
|
||||
"source": "lever",
|
||||
"manually_added": false,
|
||||
"external_id": "jobgether:4c3858e9-1786-4dac-b582-8829ff55b76e",
|
||||
"url": "https://jobs.lever.co/jobgether/4c3858e9-1786-4dac-b582-8829ff55b76e?utm_source=freehire.me",
|
||||
"title": "Head of Operations – Multi-Branch Restaurants",
|
||||
"company": "jobgether",
|
||||
"company_slug": "jobgether",
|
||||
"location": "India",
|
||||
"description": "*This position is listed on behalf of a partner company, who manages all applications and next steps. Our partner is looking for a Head of Operations – Multi-Branch Restaurants based in India.*\n\nThis is a hands-on operational leadership role overseeing performance across a growing multi-location food-service business.\nYou will work directly with the CEO and lead managers across branches, focusing on execution, accountability, profitability, and scalable systems.\nThe role combines multi-site restaurant operations with sales growth, business development, and the creation of new service opportunities.\nYou will bring greater visibility to branch performance through dashboards, structured management routines, data, AI, and automation.\nSuccess will depend on turning operational problems into clear plans, accountable ownership, measurable outcomes, and repeatable processes.\nWith delegated COO-level responsibility, the position offers significant autonomy and a path toward broader executive leadership as the business grows.\n\nAccountabilities:\n-----------------\n\n* Lead and improve performance",
|
||||
"countries": [
|
||||
"ae",
|
||||
"at",
|
||||
"au",
|
||||
"be",
|
||||
"bg",
|
||||
"br",
|
||||
"ca",
|
||||
"ch",
|
||||
"cl",
|
||||
"cz",
|
||||
"de",
|
||||
"dk",
|
||||
"ee",
|
||||
"es",
|
||||
"fi",
|
||||
"fr",
|
||||
"gb",
|
||||
"gr",
|
||||
"hr",
|
||||
"hu",
|
||||
"ie",
|
||||
"il",
|
||||
"in",
|
||||
"it",
|
||||
"lu",
|
||||
"mx",
|
||||
"nl",
|
||||
"no",
|
||||
"pl",
|
||||
"pt",
|
||||
"ro",
|
||||
"sa",
|
||||
"se",
|
||||
"tr",
|
||||
"us",
|
||||
"za"
|
||||
],
|
||||
"regions": [
|
||||
"africa",
|
||||
"apac",
|
||||
"eu",
|
||||
"latam",
|
||||
"mena",
|
||||
"north_america",
|
||||
"uk"
|
||||
],
|
||||
"work_mode": "remote",
|
||||
"skills": [
|
||||
"acceptance-criteria",
|
||||
"ai",
|
||||
"automation",
|
||||
"business-development",
|
||||
"customer-retention",
|
||||
"gdpr",
|
||||
"stakeholder-management"
|
||||
],
|
||||
"cities": [
|
||||
"Luxembourg",
|
||||
"Mexico City"
|
||||
],
|
||||
"collections": [],
|
||||
"is_tech": "non_tech",
|
||||
"auto_apply_available": true,
|
||||
"posted_at": "2026-09-29T11:34:14Z",
|
||||
"created_at": "2026-09-29T12:35:25Z",
|
||||
"updated_at": "2026-09-29T12:35:25Z",
|
||||
"last_seen_at": "2026-10-03T02:38:50Z",
|
||||
"closed_at": null,
|
||||
"enrichment": {
|
||||
"employment_type": "full_time",
|
||||
"seniority": "c_level",
|
||||
"experience_years_min": 7,
|
||||
"category": "operations",
|
||||
"posting_language": "en"
|
||||
},
|
||||
"enriched_at": null,
|
||||
"enrichment_version": 0,
|
||||
"view_count": 3,
|
||||
"applied_count": 0,
|
||||
"upvote_count": 0,
|
||||
"downvote_count": 0,
|
||||
"my_vote": 0,
|
||||
"reality": {
|
||||
"class": "fresh",
|
||||
"age_days": 3,
|
||||
"repost_count": 1,
|
||||
"mass_posting_count": 1,
|
||||
"fake_freshness": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"public_slug": "administrations-og-okonomikoordinator-danish-data-science-academy-dtu-compute-bygning-322-4buhupzn",
|
||||
"source": "jobnet",
|
||||
"manually_added": false,
|
||||
"external_id": ":d2f7064f-c83e-4195-9ea5-79021a108983",
|
||||
"url": "https://job.jobnet.dk/CV/FindWork/Details/d2f7064f-c83e-4195-9ea5-79021a108983?utm_source=freehire.me",
|
||||
"title": "Administrations- og økonomikoordinator - Danish Data Science Academy",
|
||||
"company": "DTU Compute - Bygning 322",
|
||||
"company_slug": "dtu-compute-bygning-322",
|
||||
"location": "Kongens Lyngby, Danmark",
|
||||
"description": "Som ankerperson for økonomi og administration bidrager du til at Danish Data Science Academy (DDSA) skaber vækst for mennesker gennem vidensdeling og talentudvikling.\n\nTrives du i en lille organisation med ansvar for dit eget område – og med lyst til at spille en aktiv rolle i fællesskabet?\n\nVi søger en administrations- og økonomikoordinator der skaber overblik, får processerne til at hænge sammen og sikrer, at både økonomi og administration fungerer i hverdagen. Du motiveres af, at regnskabet stemmer, har teknisk flair, og øjner muligheder i AI. Med engagement og overblik forbinder du kollegaer og vores faglige netværk.\n\nLyder det som dig, vil vi rigtig gerne høre fra dig.\n\n**Jobbet som koordinator hos DDSA** \nSom administrations- og økonomikoordinator vil dine primære opgaver være:\n\n- Administration af legater og rejserefusion, herunder korrespondance med legatmodtagere\n- Regnskab og rapportering til fonde\n- Systemadministrator på digitale platforme\n- Bistand til mødereferater og administrative opgaver i sekretariatet\n\nDu kommer til at arbejde tæt sammen med direktøren omkring øko",
|
||||
"countries": [
|
||||
"dk"
|
||||
],
|
||||
"regions": [
|
||||
"eu"
|
||||
],
|
||||
"skills": [
|
||||
"ai",
|
||||
"data-science"
|
||||
],
|
||||
"cities": [],
|
||||
"collections": [],
|
||||
"is_tech": "tech",
|
||||
"posted_at": "2026-09-29T22:00:00Z",
|
||||
"created_at": "2026-09-30T14:50:41Z",
|
||||
"updated_at": "2026-09-30T14:50:41Z",
|
||||
"last_seen_at": "2026-10-03T07:07:38Z",
|
||||
"closed_at": null,
|
||||
"enrichment": {
|
||||
"education_level": "phd",
|
||||
"category": "data_science",
|
||||
"posting_language": "da"
|
||||
},
|
||||
"enriched_at": null,
|
||||
"enrichment_version": 0,
|
||||
"view_count": 2,
|
||||
"applied_count": 0,
|
||||
"upvote_count": 0,
|
||||
"downvote_count": 0,
|
||||
"my_vote": 0,
|
||||
"reality": {
|
||||
"class": "fresh",
|
||||
"age_days": 2,
|
||||
"repost_count": 2,
|
||||
"mass_posting_count": 2,
|
||||
"fake_freshness": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"public_slug": "senior-security-engineer-datadome-ynkfzccg",
|
||||
"source": "greenhouse",
|
||||
"manually_added": false,
|
||||
"external_id": "ddome:8602650002",
|
||||
"url": "https://job-boards.greenhouse.io/ddome/jobs/8602650002?utm_source=freehire.me",
|
||||
"title": "Senior Security Engineer",
|
||||
"company": "DataDome",
|
||||
"company_slug": "datadome",
|
||||
"location": "France - Remote",
|
||||
"description": "*⭐ About the role :*\n\nAt DataDome, security is a core part of how we build and scale. Our security team already covers GRC, SecOps, and security leadership, and we are now looking for a senior individual contributor to strengthen the engineering-facing side of the function.\n\nAs DataDome evolves from a single product into a broader platform, our security scope is expanding across product, infrastructure, internal systems, and AI-enabled workflows. At the same time, our regulatory and assurance requirements are becoming more demanding, including ISO 27001 and SOC 2.\n\nWe are looking for a Senior Security Engineer with a strong technical background, able to work closely with engineering teams and bring practical security expertise to product security, cloud security, application security, secure software supply chain, security tooling, and AI security topics.\n\nThis role reports directly to the Head of Security. It is a pure individual contributor position with no management responsibilities. Impact comes from technical depth, hands-on execution, and cross-functional influence.\n\n👉 *You wi",
|
||||
"countries": [
|
||||
"fr"
|
||||
],
|
||||
"regions": [
|
||||
"eu"
|
||||
],
|
||||
"work_mode": "remote",
|
||||
"skills": [
|
||||
"ai",
|
||||
"api",
|
||||
"automation",
|
||||
"cloud",
|
||||
"cloud-security",
|
||||
"iso-27001",
|
||||
"risk-assessment",
|
||||
"saas",
|
||||
"soc-2"
|
||||
],
|
||||
"cities": [
|
||||
"Paris"
|
||||
],
|
||||
"collections": [],
|
||||
"is_tech": "tech",
|
||||
"auto_apply_available": true,
|
||||
"posted_at": "2026-09-30T15:28:41Z",
|
||||
"created_at": "2026-06-22T17:04:52Z",
|
||||
"updated_at": "2026-09-30T16:21:01Z",
|
||||
"last_seen_at": "2026-10-03T02:12:47Z",
|
||||
"closed_at": null,
|
||||
"enrichment": {
|
||||
"summary": "A Senior Security Engineer advises on product/cloud security, AI security, and secure software supply chain while improving security tooling and enabling engineering teams to adopt pragmatic security practices at an AI-driven cybersecurity firm.",
|
||||
"relocation": "supported",
|
||||
"timezone_note": "Remote with occasional presence in Paris (CET timezone).",
|
||||
"seniority": "senior",
|
||||
"experience_years_min": 7,
|
||||
"category": "security",
|
||||
"domains": [
|
||||
"cybersecurity",
|
||||
"ai"
|
||||
],
|
||||
"posting_language": "en",
|
||||
"company_type": "product",
|
||||
"company_size": "501-1000"
|
||||
},
|
||||
"enriched_at": "2026-08-06T14:38:11Z",
|
||||
"enrichment_version": 2,
|
||||
"view_count": 7,
|
||||
"applied_count": 0,
|
||||
"upvote_count": 0,
|
||||
"downvote_count": 0,
|
||||
"my_vote": 0,
|
||||
"reality": {
|
||||
"class": "stale",
|
||||
"age_days": 102,
|
||||
"repost_count": 2,
|
||||
"mass_posting_count": 1,
|
||||
"fake_freshness": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"public_slug": "data-center-technician-ii-global-server-operations-google-4foofitu",
|
||||
"source": "google",
|
||||
"manually_added": false,
|
||||
"external_id": ":119282996652974790",
|
||||
"url": "https://www.google.com/about/careers/applications/jobs/results/119282996652974790?utm_source=freehire.me",
|
||||
"title": "Data Center Technician II, Global Server Operations",
|
||||
"company": "Google",
|
||||
"company_slug": "google",
|
||||
"location": "Fredericia, Denmark",
|
||||
"description": "Google isn't just a software company. The Hardware Operations team is responsible for monitoring the state-of-the-art physical infrastructure behind Google's powerful search technology. As an Operations Technician, you'll install, configure, test, troubleshoot and maintain hardware (like servers and its components) and server software (like Google's Linux cluster). You'll also take on the configuration of more complex components such as networks, routers, hubs, bridges, switches and networking protocols. You'll participate in or lead small project teams on larger installations and develop project contingency plans. A typical day involves manual movement and installation of racks, and while it can sometimes be physically demanding, you are excited to work with infrastructure that is at the cutting-edge of computer technology.<p>Behind everything our users see online is the architecture built by the Technical Infrastructure team to keep it running. From developing and maintaining our data centers to building the next generation of Google platforms, we make Googl",
|
||||
"countries": [
|
||||
"dk"
|
||||
],
|
||||
"regions": [
|
||||
"eu"
|
||||
],
|
||||
"skills": [
|
||||
"linux",
|
||||
"networking"
|
||||
],
|
||||
"cities": [
|
||||
"João Pessoa"
|
||||
],
|
||||
"collections": [],
|
||||
"is_tech": "tech",
|
||||
"posted_at": "2026-10-01T07:39:26Z",
|
||||
"created_at": "2026-10-01T08:40:10Z",
|
||||
"updated_at": "2026-10-01T09:25:08Z",
|
||||
"last_seen_at": "2026-10-03T06:52:14Z",
|
||||
"closed_at": null,
|
||||
"enrichment": {
|
||||
"summary": "As a Data Center Technician II at Google in Fredericia, you install, configure, troubleshoot, and repair servers, Linux clusters, and networking equipment in Google's data centers. The hands-on role includes rack installation, equipment maintenance, and issue resolution on a shift-based schedule.",
|
||||
"salary_min": 600000,
|
||||
"salary_max": 615000,
|
||||
"salary_currency": "DKK",
|
||||
"salary_period": "year",
|
||||
"education_level": "bachelor",
|
||||
"category": "devops",
|
||||
"domains": [
|
||||
"other"
|
||||
],
|
||||
"posting_language": "en",
|
||||
"company_type": "product",
|
||||
"company_size": "1000+"
|
||||
},
|
||||
"enriched_at": "2026-10-01T09:25:08Z",
|
||||
"enrichment_version": 2,
|
||||
"view_count": 1,
|
||||
"applied_count": 0,
|
||||
"upvote_count": 0,
|
||||
"downvote_count": 0,
|
||||
"my_vote": 0,
|
||||
"reality": {
|
||||
"class": "fresh",
|
||||
"age_days": 1,
|
||||
"repost_count": 1,
|
||||
"mass_posting_count": 1,
|
||||
"fake_freshness": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"limit": 100,
|
||||
"offset": 0,
|
||||
"total": 1391
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,217 @@
|
||||
"""The freehire reader (public JSON API, `/agent/jobs/search`): 100 hits a
|
||||
page, offsets to 10,000. No network: `get` is a stub."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
from urllib.parse import parse_qs, urlsplit
|
||||
|
||||
import pytest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
if str(ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(ROOT))
|
||||
|
||||
from plugins import readers # noqa: E402
|
||||
from plugins.readers import Ask, freehire # noqa: E402
|
||||
|
||||
BODY = (ROOT / "tests" / "fixtures" / "search" / "freehire-places.json").read_bytes()
|
||||
|
||||
|
||||
def _rows() -> dict[str, dict[str, Any]]:
|
||||
decoded, *_ = freehire.page(lambda url, **kw: BODY, "", None, Ask())
|
||||
return {row["company"]: row for row in freehire.rows(decoded, "")}
|
||||
|
||||
|
||||
def _stock(total: int | None, stock: int, asked: list[str]) -> Any:
|
||||
def get(url: str, **kwargs: Any) -> bytes:
|
||||
asked.append(url)
|
||||
query = parse_qs(urlsplit(url).query)
|
||||
start, limit = int(query["offset"][0]), int(query["limit"][0])
|
||||
body: dict[str, Any] = {"data": [
|
||||
{"public_slug": f"role-{n}", "title": f"Role {n}", "url": f"https://x.example/{n}"}
|
||||
for n in range(start, min(start + limit, stock))], "meta": {}}
|
||||
if total is not None:
|
||||
body["meta"]["total"] = total
|
||||
return json.dumps(body).encode()
|
||||
return get
|
||||
|
||||
|
||||
def test_it_is_a_search_reader_whose_robots_txt_allows_the_api() -> None:
|
||||
assert readers.PROVIDERS["freehire"] is freehire
|
||||
reads = freehire.READS
|
||||
assert (reads.scope, reads.page_size, reads.ceiling, reads.places) == (
|
||||
"search", 100, 10000, "many")
|
||||
assert reads.filters.declared() == {"query": "one", "country": "many", "remote": "one"}
|
||||
assert "Googlebot" in reads.robots and "2026-10-03" in reads.robots
|
||||
assert freehire.allowed("")("freehire.me") and not freehire.allowed("")("example.com")
|
||||
|
||||
|
||||
def test_it_reads_the_full_text_company_date_and_source() -> None:
|
||||
rows = _rows()
|
||||
first = rows["Zeta Global"]
|
||||
assert first["title"] == "Data Engineer"
|
||||
assert first["posted"].isoformat().startswith("2026-")
|
||||
assert first["description"] and "<" not in first["description"]
|
||||
assert first["source"] == "greenhouse" and "teaser" not in first
|
||||
assert rows["DTU Compute - Bygning 322"]["source"] == "jobnet"
|
||||
|
||||
|
||||
def test_it_removes_utm_source_and_nothing_else_from_the_link() -> None:
|
||||
assert _rows()["Zeta Global"]["url"].startswith("https://") and "utm_source" not in _rows()["Zeta Global"]["url"]
|
||||
assert freehire._url("https://x.example/j?id=7&utm_source=freehire.me&ref=a") == (
|
||||
"https://x.example/j?id=7&ref=a")
|
||||
assert freehire._url("https://x.example/j?utm_source=freehire.me") == "https://x.example/j"
|
||||
assert freehire._url("https://x.example/j/") == "https://x.example/j/"
|
||||
|
||||
|
||||
def test_it_keeps_the_location_and_every_city_it_does_not_name() -> None:
|
||||
rows = _rows()
|
||||
assert [p["text"] for p in rows["Zeta Global"]["places"]] == [
|
||||
"Copenhagen, Denmark", "Berlin", "London"] # Copenhagen is named already
|
||||
assert rows["Zeta Global"]["location"] == "Copenhagen, Denmark"
|
||||
assert [p["text"] for p in rows["DataDome"]["places"]] == ["France - Remote", "Paris"]
|
||||
assert [p["text"] for p in rows["jobgether"]["places"]] == ["India", "Luxembourg", "Mexico City"]
|
||||
assert [p["text"] for p in rows["DTU Compute - Bygning 322"]["places"]] == ["Kongens Lyngby, Danmark"]
|
||||
|
||||
|
||||
def test_a_role_without_a_location_has_its_cities() -> None:
|
||||
novo = _rows()["Novo Nordisk"]
|
||||
assert [p["text"] for p in novo["places"]] == ["Måløv"]
|
||||
|
||||
|
||||
def test_work_mode_is_the_remote_word_and_marks_the_places() -> None:
|
||||
rows = _rows()
|
||||
assert rows["jobgether"]["remote"] == "remote"
|
||||
assert all(p["remote"] is True for p in rows["jobgether"]["places"])
|
||||
assert rows["Zeta Global"]["remote"] is None
|
||||
assert all(p["remote"] is None for p in rows["Zeta Global"]["places"])
|
||||
hit = {"location": "Aarhus", "cities": []}
|
||||
assert freehire._places(hit, "onsite") == [{"text": "Aarhus", "remote": False}]
|
||||
assert freehire._places(hit, "hybrid") == [{"text": "Aarhus", "remote": None}]
|
||||
|
||||
|
||||
def test_country_is_stated_only_for_a_role_in_exactly_one() -> None:
|
||||
rows = _rows()
|
||||
assert rows["DTU Compute - Bygning 322"]["country"] == "DK"
|
||||
assert rows["Zeta Global"]["country"] == "" and rows["jobgether"]["country"] == "" # 3 and 36
|
||||
|
||||
|
||||
def test_a_yearly_salary_goes_to_the_columns_and_says_its_period() -> None:
|
||||
novo = _rows()["Novo Nordisk"]
|
||||
assert (novo["salary_min"], novo["salary_max"], novo["currency"]) == (651000, 956900, "DKK")
|
||||
assert novo["salary_text"] == "DKK 651,000 to 956,900 per year"
|
||||
assert "salary_min" not in _rows()["Zeta Global"]
|
||||
|
||||
|
||||
def test_a_salary_of_another_period_is_a_line_and_no_figures() -> None:
|
||||
month = {"salary_min": 40000, "salary_max": 50000, "salary_currency": "dkk",
|
||||
"salary_period": "month"}
|
||||
assert freehire._pay(month) == {"salary_text": "DKK 40,000 to 50,000 per month"}
|
||||
assert freehire._pay({"salary_min": 40000, "salary_currency": "EUR"}) == {} # no period
|
||||
assert freehire._pay({"salary_period": "year"}) == {}
|
||||
assert freehire._pay({"salary_min": 0, "salary_max": 0, "salary_period": "year",
|
||||
"salary_currency": "EUR"}) == {}
|
||||
year = freehire._pay({"salary_min": 60000, "salary_currency": "eur", "salary_period": "year"})
|
||||
assert (year["salary_min"], year["salary_max"], year["currency"]) == (60000, None, "EUR")
|
||||
|
||||
|
||||
def test_it_refuses_a_hit_without_a_title_an_id_or_a_web_link() -> None:
|
||||
hits = [{"public_slug": "a", "title": "A", "url": "javascript:alert(1)"},
|
||||
{"public_slug": "", "title": "B", "url": "https://x.example/b"},
|
||||
{"public_slug": "c", "title": " ", "url": "https://x.example/c"},
|
||||
{"public_slug": "d", "title": "D", "url": "https://x.example/d?utm_source=freehire.me"}]
|
||||
found = freehire.rows({"data": hits}, "")
|
||||
assert [row["source_id"] for row in found] == ["d"]
|
||||
assert found[0]["url"] == "https://x.example/d" and found[0]["places"] == []
|
||||
|
||||
|
||||
def test_it_asks_for_countries_work_mode_and_the_text_in_html() -> None:
|
||||
asked: list[str] = []
|
||||
freehire.page(_stock(250, 250, asked), "", None,
|
||||
Ask(params={"q": "head of data", "country": "dk,SE", "remote": "hybrid"}))
|
||||
url = urlsplit(asked[0])
|
||||
assert (url.scheme, url.netloc, url.path) == ("https", "freehire.me", "/api/v1/agent/jobs/search")
|
||||
assert parse_qs(url.query) == {
|
||||
"q": ["head of data"], "limit": ["100"], "offset": ["0"], "sort": ["posted_at"],
|
||||
"order": ["desc"], "description_format": ["html"], "countries": ["dk", "se"],
|
||||
"work_mode": ["hybrid"]}
|
||||
assert asked[0].count("countries=") == 2
|
||||
|
||||
|
||||
def test_it_asks_nothing_it_was_not_given() -> None:
|
||||
asked: list[str] = []
|
||||
freehire.page(_stock(None, 5, asked), "", None, Ask(params={"q": "x", "country": "",
|
||||
"remote": ""}))
|
||||
freehire.page(_stock(None, 5, asked), "", 100, Ask())
|
||||
assert "countries" not in asked[0] and "work_mode" not in asked[0]
|
||||
assert "q=" not in asked[1] and "offset=100" in asked[1]
|
||||
|
||||
|
||||
def test_the_ask_wins_over_the_saved_params_where_it_is_set() -> None:
|
||||
asked: list[str] = []
|
||||
freehire.page(_stock(None, 5, asked), "", None,
|
||||
Ask(countries=("DK", "NO"), query="data", remote=True,
|
||||
params={"q": "other", "country": "se"}))
|
||||
query = parse_qs(urlsplit(asked[0]).query)
|
||||
assert (query["q"], query["countries"], query["work_mode"]) == (
|
||||
["data"], ["dk", "no"], ["remote"])
|
||||
freehire.page(_stock(None, 5, asked), "", None, Ask(countries=("DK,SE",))) # one value
|
||||
assert parse_qs(urlsplit(asked[1]).query)["countries"] == ["dk", "se"]
|
||||
|
||||
|
||||
def test_it_names_itself_in_the_user_agent() -> None:
|
||||
seen: list[dict[str, str]] = []
|
||||
|
||||
def get(url: str, **kwargs: Any) -> bytes:
|
||||
seen.append(kwargs["headers"])
|
||||
return b'{"data": [], "meta": {"total": 0}}'
|
||||
|
||||
freehire.page(get, "", None, Ask())
|
||||
assert seen[0]["User-Agent"].startswith("roledesk/jobboard (")
|
||||
|
||||
|
||||
def test_the_total_is_the_metas_and_a_missing_one_is_none() -> None:
|
||||
_decoded, found, total, _cursor = freehire.page(lambda url, **kw: BODY, "", None, Ask())
|
||||
assert total == 1391 and [f["id"] for f in found] == [
|
||||
hit["public_slug"] for hit in json.loads(BODY)["data"]]
|
||||
assert freehire.page(_stock(None, 5, []), "", None, Ask())[2] is None
|
||||
|
||||
|
||||
@pytest.mark.parametrize(("cursor", "stock", "after"), [
|
||||
(None, 250, 100), (200, 250, None), # a short page is the end
|
||||
(9800, 20000, 9900), (9900, 20000, None), # offset + limit stays within 10,000
|
||||
])
|
||||
def test_it_pages_by_offset_up_to_the_ceiling(
|
||||
cursor: int | None, stock: int, after: int | None) -> None:
|
||||
asked: list[str] = []
|
||||
_decoded, _found, _total, nxt = freehire.page(
|
||||
_stock(None, stock, asked), "", cursor, Ask(params={"q": "x"}))
|
||||
assert nxt == after
|
||||
query = parse_qs(urlsplit(asked[0]).query)
|
||||
assert int(query["offset"][0]) + int(query["limit"][0]) <= 10000
|
||||
|
||||
|
||||
def test_it_refuses_a_country_or_a_work_mode_it_cannot_send() -> None:
|
||||
for params in ({"country": "denmark"}, {"remote": "anywhere"}):
|
||||
with pytest.raises(ValueError):
|
||||
freehire.page(lambda url, **kw: b"{}", "", None, Ask(params=params))
|
||||
|
||||
|
||||
def test_the_modes_are_freehires_work_modes() -> None:
|
||||
assert list(freehire.MODES) == ["remote", "hybrid", "onsite"]
|
||||
assert all(label for label in freehire.MODES.values())
|
||||
|
||||
|
||||
def test_saved_params_keep_codes_in_lower_case_and_a_known_mode() -> None:
|
||||
assert freehire.clean_params({"q": "x", "country": " DK, se ,dk", "remote": "Hybrid"}) == {
|
||||
"q": "x", "country": "dk,se", "remote": "hybrid"}
|
||||
assert freehire.clean_params({"q": "x", "country": ["NO", "fi"]})["country"] == "no,fi"
|
||||
assert freehire.clean_params({"q": "x"}) == {"q": "x", "country": "", "remote": ""}
|
||||
with pytest.raises(ValueError, match="country"):
|
||||
freehire.clean_params({"q": "x", "country": "denmark"})
|
||||
with pytest.raises(ValueError, match="remote"):
|
||||
freehire.clean_params({"q": "x", "remote": "anywhere"})
|
||||
Reference in new issue
Block a user