fix(linkedin-search): drop the never-delivered applyUrl detail field

The regex required class= before href= within one tag; LinkedIn's real
markup puts href first, so applyUrl was null on every live posting while
SKILL.md claimed the command returns an apply link. Fixing the regex
would only yield the job-view URL - a duplicate of url - so the field is
removed rather than repaired, and a test pins the removal. Review
finding F19 (2026-08-19), decision approved by Mads.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mads Lorentzen
2026-08-19 20:34:35 +02:00
co-authored by Claude Opus 5
parent 56f679e5c0
commit a306912133
5 changed files with 19 additions and 7 deletions
@@ -43,7 +43,6 @@ export async function runDetail(opts: DetailOpts): Promise<number> {
job.description || "(no description)",
"",
`URL: ${job.url}`,
job.applyUrl ? `Apply: ${job.applyUrl}` : "",
].filter((l) => l !== "")
process.stdout.write(lines.join("\n") + "\n")
} else {
@@ -63,7 +63,6 @@ export interface JobDetail extends JobCard {
employmentType: string | null
jobFunction: string | null
industries: string | null
applyUrl: string | null
}
/**
@@ -228,9 +227,6 @@ export function parseJobDetail(html: string, id: string): JobDetail {
criteria[clean(cm[1]).toLowerCase()] = clean(cm[2])
}
const applyMatch = html.match(/class="topcard__link[^"]*"[^>]*href="([^"]+)"/i)
const applyUrl = applyMatch ? decodeHtmlEntities(applyMatch[1]).split("?")[0] : null
return {
id,
title: title ? clean(title) : "(untitled)",
@@ -244,7 +240,6 @@ export function parseJobDetail(html: string, id: string): JobDetail {
employmentType: criteria["employment type"] ?? null,
jobFunction: criteria["job function"] ?? null,
industries: criteria["industries"] ?? null,
applyUrl,
}
}