Sources tab: searches, company boards and the prune by region, in the app
What a pull reads can now be changed on a page instead of only the command line: try a search and see its first ten results before saving it, edit or remove one, follow a company's ATS board, switch any board or search on or off, and preview and apply a prune by region. Each row shows its open roles and the countries they are in. The page and `app companies`/`app searches` call the same functions in app/jobs/sources.py. Switching a target off closes its open roles, and the pull's settle closes them again if a batch in flight reopened them. Roles pulled before `country` existed are backfilled at startup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
047f7cd8ad
commit
6b40702a9a
16 files changed
+1068
-92
No files matched your search
+9
-1
@@ -89,6 +89,14 @@ def _get(client: httpx.Client, url: str, params: dict[str, Any]) -> bytes:
|
||||
JOBINDEX_RSS = "https://www.jobindex.dk/jobsoegning.rss"
|
||||
JOBINDEX_PAGE = 20
|
||||
|
||||
#: Jobindex's `geoareaid` for the regions and the biggest towns, as checked
|
||||
#: against the titles its feeds answer with. 0 is all of Denmark.
|
||||
JOBINDEX_AREAS: dict[int, str] = {
|
||||
0: "All of Denmark", 1: "Region Hovedstaden", 4: "Region Sjælland",
|
||||
2: "Region Midtjylland", 5: "Region Syddanmark", 3: "Region Nordjylland",
|
||||
8: "Aarhus", 7: "Aalborg",
|
||||
}
|
||||
|
||||
_ALT = re.compile(r'\balt="([^"]+)"', re.IGNORECASE)
|
||||
_H4 = re.compile(r"<h4>(.*?)</h4>", re.IGNORECASE | re.DOTALL)
|
||||
_AREA = re.compile(r'class="jix_robotjob--area">(.*?)</span>', re.IGNORECASE | re.DOTALL)
|
||||
@@ -112,7 +120,7 @@ def _remote(text: str) -> str | None:
|
||||
def _text(fragment: str) -> str:
|
||||
"""HTML to plain text. Jobindex breaks titles after a slash with a
|
||||
zero-width space, which would otherwise end up in `title_key`."""
|
||||
return html.unescape(strip_html(fragment)).replace("", "").strip()
|
||||
return html.unescape(strip_html(fragment)).replace("\u200b", "").strip()
|
||||
|
||||
|
||||
def parse_jobindex(body: bytes) -> list[Row]:
|
||||
|
||||
Reference in new issue
Block a user