mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-09-17 08:36:25 +00:00
fix(cli): honest User-Agent token on linkedin-search
The last portal CLI still sending a full Chrome spoof after #283 and
4551346. Live-verified: search and detail endpoints serve identical
responses to Mozilla/5.0 (compatible; linkedin-search-cli/1.0).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
beb53f1a9f
commit
da12d6e38e
@@ -12,9 +12,7 @@ export function writeError(error: string, code: string): void {
|
||||
process.stderr.write(JSON.stringify({ error, code }) + "\n")
|
||||
}
|
||||
|
||||
const UA =
|
||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 " +
|
||||
"(KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
|
||||
const UA = "Mozilla/5.0 (compatible; linkedin-search-cli/1.0)"
|
||||
|
||||
/** Fetch HTML with exponential backoff on 429/5xx. Returns "" on a 404. */
|
||||
export async function htmlFetch(url: string): Promise<string> {
|
||||
|
||||
Reference in New Issue
Block a user