Repository navigation
feat(job-sources): read Jobs from links, files and copied text into tagged snapshots - #14
Merged
Merged
Conversation
Add job reading to the headhunter helper script. hhweb.py holds the site rules, a fetcher that names itself and follows robots.txt, a schema.org JobPosting reader, and Listing link extraction. hh.py gains job listing, fetch, save, list and accept commands, and validate checks Job snapshots. Yourator and company careers pages are fetched; 104 and CakeResume are read in a browser because they refuse automated requests; LinkedIn is read only from the user's signed-in browser or pasted text. Refs #12 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g browser HTML 104 and CakeResume block automated requests, so the skill now guides the user: scroll the search results until every Job has loaded, copy the page and paste it, and read Job pages in a browser or from copied text. Drop the --html options and the in-page snippet; job fetch --text covers copied text. Refs #12 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ort user input Users give Jobs and Candidate material in any form. job fetch now reads a Job from a link, an HTML, Word, PDF or text file, or both; a Job saved without a link gets a j-user id from its company and title, and read_with gains "file". SKILL.md opens its workflows with a step that sorts what the user gives into Candidate material, one Job, many Jobs, or a mix. Refs #12 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Job reading from #12: Listings and Jobs from links, files and copied text, saved as tagged Job snapshots.
skills/headhunter/scripts/hhweb.py: site rules for 104, CakeResume, Yourator and LinkedIn; a fetcher that names itself in its User-Agent, applies robots.txt (wildcards, longest rule wins) and stops at refusals and bot checks; schema.org JobPosting reading; Job links from careers Listing pages; the Yourator Listing JSONskills/headhunter/scripts/hh.py:job listing,job fetch [<url>] [--file],job save [--replace],job list,job accept <term> <tag>;validatechecks Job snapshots;extract-textturns HTML into textskills/headhunter/SKILL.md: a first step that sorts what the user gives (Candidate material, one Job, many Jobs, or a mix), the Job snapshot format, how each site is read, and the guided copy-and-paste flow for 104 and CakeResumeCONTEXT.md: Listing covers files and copied text; Job lists what a snapshot holds and how Jobs without a link are identifiedREADME.md/README.zh-TW.md: the Job reading featureRelated Issues
Closes #12
Type of Change
Decisions
pdftotextwhen installed, otherwise the agent reads themj-<host>-<hash of URL>. No link:j-user-<hash of company and title>. Tracking parameters are stripped before hashingjobs/<id>.md: a YAML block (the same subset as other Data folder files) with structured fields, then the posting textproposedterm; a proposed term that already has a Tag is refused;job acceptmoves an accepted term into tags across all snapshots--replaceAcceptance criteria not met as written
These follow the direction in the session that opened this PR:
Migration
jobs/already exists in Data folders created by #1, and nothing wrote Job snapshots before this change, so no migration is needed.Validation
All runs used a scratch
HEADHUNTER_DATA_DIRoutside any repository, on Python 3.9 unless noted.Site testing (before the code)
curlwithUser-Agent: headhunter-agent (+repo)→ 104 robots.txt and search: 403; CakeResume: 403 Cloudflare "Just a moment..."; Yourator robots.txt: onlyDisallow: /r/*, search page and/api/v4/jobs: 200jobs/search/api/jobs403, "共 0 筆"; 104 job pagesjob/8p1gz,job/7wutt: page 200, data request 403, redirect to the 404 page; CakeResume: "Performing security verification" did not clearYourator (real)
job listing "https://www.yourator.co/jobs?term%5B%5D=python&area%5B%5D=TPE"→ 20 Jobs with title, company, location, salary and linkjob fetcheach → JobPosting data and page text;job save→j-yourator-39119(8 must-haves, 3 nice-to-haves, 2 proposed terms),j-yourator-48495,j-yourator-25039job listingmarks the 3 saved Jobs with*Company careers page (real)
job listing https://jobs.lever.co/pinkoi→ 6 Jobs with descriptive titles;job fetchof the Backend Engineer page → JobPosting data; saved asj-jobs-lever-co-91b1946aFiles, copied text and no link (fictional content)
job fetch --filewith a real Yourator page saved as HTML → JobPosting data without a link; with the link →j-yourator-39119, "already saved"job fetch --file posting.docx→ text;--file posting.pdf→ "no PDF text extractor is installed; read the PDF with your own file reading…" (the PDF was then read directly)job savewith nourl→j-user-f6749e6b; saving again → "already exists; pass --replace"; the same Job markedread_with: fetch→ refusedj-104-zz001(tracking parameterjobsourcestripped)j-linkedin-4000000001;job fetch/job listingon LinkedIn URLs → refused; a LinkedIn snapshot markedfetch→ refusedChecks
Go→ "already the Tag skill/go"job accept "AI coding tools" tool/ai-coding-toolsbefore the Tag exists → refused; after adding it → 2 snapshots updated; a later save proposing the same term → refused$, longest match and agent-specific groups; live Yourator:/api/v4/jobsallowed,/r/xdisallowedvalidate→OK: taxonomy.yml, 0 Candidate folder(s) and 7 Job snapshot(s) are valid.on Python 3.9 and 3.13; the Candidate data from [Feature] Candidate database: import, quality check, tags, CRUD and search #1 still validateshhyamlclaude plugin validate .→ passed;claude plugin validate .claude-plugin/plugin.json→ passed with the expectedCLAUDE.mdwarningruff check --select E,F,W,B skills/headhunter/scripts→ all checks passed; all scripts parse on Python 3.9Not run
claude --plugin-dir .pdftotextinstalled; WindowsChecklist
skills/headhunter/SKILL.md,README.mdandREADME.zh-TW.mdupdated when behavior or data layout changed🤖 Generated with Claude Code