feat(upwork): add search, feed, and detail commands#1609
Open
NSOiO wants to merge 3 commits into
Open
Conversation
Three browser-mode adapters for upwork.com, all read-only.
- search: keyword job search with location/sort/page/per_page filters
- feed: personalized recommended feed (best-matches | most-recent),
requires login
- detail: full job posting + client stats by ciphertext id
All three run through Strategy.COOKIE (Cloudflare-protected). List
adapters read from window.__NUXT__.state.{jobsSearch,feedBestMatch,
feedMostRecent}.jobs[] rather than DOM-scraping cards; detail reads
the Vuex store at window.$nuxt.$store.state.jobDetails.{job,buyer}.
Decoders handle Upwork's three coded enum styles (i18n keys like
jsn_Intermediate_206 on search, rendered labels like 'Intermediate'
on feed, numeric contractorTier on detail) so the output columns
stay stable across surfaces. 41 unit tests cover validators,
decoders, URL builders, row mappers, and the func-level happy /
auth / challenge / empty paths against mocked page.evaluate.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Surfaces the upwork adapter through the same entry points other browser adapters use: - docs/.vitepress/config.mts: add Upwork to the Browser Adapters sidebar next to Indeed - README.md / README.zh-CN.md: add an upwork row to the Built-in Commands / 内置命令 tables Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dfbc226 to
004458d
Compare
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.
Description
Three browser-mode adapters for
upwork.com, all read-only. Closes #1608.search— keyword job search with--location/--sort/--page/--per_pagefiltersfeed— personalized recommended feed (best-matches|most-recent), requires logindetail— full job posting + client stats by ciphertext idRelated issue: #1608
Type of Change
Approach
All three commands run through
Strategy.COOKIEbecause upwork.com sits behind Cloudflare. List adapters read fromwindow.__NUXT__.state.{jobsSearch,feedBestMatch,feedMostRecent}.jobs[]rather than DOM-scraping cards;detailreads the Vuex store atwindow.$nuxt.$store.state.jobDetails.{job,buyer}. This keeps the columns stable when Upwork ships card markup changes.Decoders in
clis/upwork/utils.jshandle Upwork's three coded-enum styles so output stays consistent across surfaces:searchjsn_Intermediate_206feedIntermediatedetailcontractorTier: 2Tests
41 unit tests in
clis/upwork/upwork.test.jscover validators, decoders, URL builders, row mappers, and thefunc()happy / auth-required / Cloudflare-challenge / empty-result paths against mockedpage.evaluate.Full
npm testshows 11 failures, none in this PR — they are pre-existing inmain:src/weixin-download.test.ts(@jackwener/opencli/registrypackage resolution)src/browser/article-extract.e2e.test.ts(Wikipedia fixture 5s timeout)src/package-exports.test.ts(5s timeout while scanning all adapters)Checklist
tsc --noEmit, upwork test file,opencli validate)Documentation
docs/adapters/browser/upwork.mddocs/adapters/index.mdtabledocs/.vitepress/config.mts(added indfbc2266)README.md/README.zh-CN.md(added indfbc2266)search <query>,detail <jobId>)CliErrorsubclassesScreenshots / Output
Updated in
dfbc2266after a re-read of the contribution checklist — sidebar entry and README/README.zh-CN command-table row are now included.Implementation drafted with Claude Code assistance.