fix(recruiter): make recommend hit the real 推荐牛人 endpoint with working pagination#28
Open
chengyixu wants to merge 1 commit into
Open
Conversation
…ing pagination
`recruiter recommend` previously called `/wapi/zprelation/friend/greetRecSortList`
("greet rec sort list"), which re-sorts the recruiter's already-greeted candidates
and ignores the `page` param. Result: users saw only ~10 candidates and `-p N`
returned the same list reshuffled.
The actual "推荐牛人" feed on the BOSS recruiter web page calls
`/wapi/zpjob/rec/geek/list` (XHR fired on infinite scroll), which:
- returns 15 candidates per page
- paginates via `page=N`
- includes `hasMore` for the end-of-feed signal
- requires a `Referer: /web/frame/recommend/` header
Changes:
- Add `BOSS_REC_GEEK_LIST_URL` constant + Referer mapping
- Repoint `get_boss_recommend_geeks` at the real endpoint with the full
filter param set the page sends (age/school/activation/etc., zeroed)
- `--job` is now required (the endpoint is job-scoped)
- Render the richer `geekCard` payload: name / age / exp / degree / city /
salary / activeTime / encryptGeekId, plus next-page hint when hasMore
- Update README examples
Smoke-tested against an active recruiter account: page 1 returned 15
distinct candidates with `hasMore: true`; `-p 2`, `-p 3`, ... return
fresh batches as the browser does on scroll.
Co-Authored-By: Claude Opus 4.7 (1M context) <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
boss recruiter recommendwas calling/wapi/zprelation/friend/greetRecSortList("greet rec sort list" — a re-sort of already-greeted candidates), so:--job-p Nreturned the same list reshuffled (server ignorespage)Root cause
The BOSS recruiter web "推荐牛人" page uses infinite scroll. Capturing XHRs on scroll showed the real endpoint:
It returns 15 candidates per page with a
hasMoreflag — true pagination.Changes
BOSS_REC_GEEK_LIST_URLconstant +Referermapping for the recommend frameget_boss_recommend_geeksat the real endpoint with the full filter param set the web page sends (all neutral / unset)--jobis now required (the endpoint is job-scoped, and the old "no-job" mode never worked usefully)geekCardpayload: 姓名 / 年龄 / 经验 / 学历 / 城市 / 期望薪资 / 活跃 / encryptGeekIdhasMoreis true--jobTest plan
pip install -e .thenboss recruiter recommend --job <encryptJobId>returns 15 candidates withhasMore: true-p 2,-p 3, ... return fresh candidates (matches what the browser shows on scroll)--jobproduces a clear Click usage error--jsonand--yamlenvelopes unchangedage=16,-1,school=0, etc.) are still what the BOSS web page sends (captured 2026-05-12)🤖 Generated with Claude Code