scrape-nowcoder

A browser-based scraper for 牛客网 (Nowcoder), a Chinese developer community that publishes interview experiences and technical articles. It connects to Chrome, reuses an existing login, and saves selected lists and full articles as Markdown.

In plain words
What is it for?
Use it to collect recommended posts, topic feeds, search results, and interview-experience articles from Nowcoder, with options for page limits and keyword or date filters.
Why use it?
It avoids manually opening pages, scrolling through results, and copying articles from Nowcoder. It also supports filtering results by dates and keywords.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ranxi2001/zero2agent/scrape-nowcoder
Any agent
npx skills add ranxi2001/zero2Agent --skill scrape-nowcoder
Clone the repo
git clone --depth 1 https://github.com/ranxi2001/zero2Agent

Made for: Claude Code, Codex.

Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,503 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00092 $0.03503
Opus 5 $0.00046 $0.01751
Sonnet 5 $0.00018 $0.00701
Haiku 4.5 $0.00009 $0.00350

Measured 2d ago against content hash 1fb9caa3c164, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

scrape-nowcoder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/scrape-nowcoder/SKILL.md · 200 lines

How it starts

The opening of the file, as written. The whole thing — 200 lines — stays where its author put it; the contents beside it link to each section on GitHub.

scrape-nowcoder:牛客面经 CDP 抓取

基于 Chrome DevTools Protocol 原生 WebSocket,零依赖。直接连接已运行的 Chrome 调试端口,复用浏览器登录态。

工作方式

  1. 连接 Chrome 调试端口(默认 9222)
  2. 如果端口不可达,自动启动独立 Chrome 实例(~/.chrome-nowcoder
  3. 支持首页推荐流、标准话题 API、creation/subject 无限滚动话题和面经分类搜索结果
  4. 在已登录的浏览器中操作,抓取完成后 Chrome 保持运行

前置条件

  • Node.js >= 22(需要原生 WebSocket 和 fetch)
  • Google Chrome(Windows 或 macOS)以调试端口运行
  • 已在该 Chrome 中登录牛客网

首次使用

启动带调试端口的 Chrome(会自动创建 ~/.chrome-nowcoder profile):

node .claude/skills/scrape-nowcoder/scrape.mjs --login

在弹出的 Chrome 中登录牛客,profile 会持久化 cookie。cookie 过期或页面跳转登录页时重新执行 --login

用法

node .claude/skills/scrape-nowcoder/scrape.mjs [选项]

选项

参数 默认值 说明
--login 首次使用:启动 Chrome 并打开登录页
--home 抓取首页推荐流,通过连续下拉加载后续内容
--topic <url|id> 818_1 抓取话题流;支持 creation/subject/<uuid> URL、其他完整牛客 URL 或 type
--pages <n> 1 最大页数;首页模式下为连续滚动批次
--limit <n> 0 列表去重和关键词筛选后最多抓取前 n 篇详情;0 表示不限
--since <date> (空) 标准话题接口或搜索模式仅保留该日及之后内容;话题接口连续两页全部更早时停止
--until <date> (空) 标准话题接口或搜索模式仅保留该日及之前内容;与 --since 组合限定月份/区间
--keyword <kw> (空) 按关键词筛选标题和列表摘要(如“AI”、“大模型”)
--search <query> (空) 面经分类搜索模式;固定使用 type=all&searchType=顶部导航栏&subType=818 并翻页
--out <dir> .claude/skills/scrape-nowcoder/nowcoder-output 输出目录
--port <port> 9222 Chrome 调试端口
--delay <ms> 2000 请求间隔,避免触发反爬

常用示例

# 默认抓牛客面经话题 type=818_1 的第 1 页
node .claude/skills/scrape-nowcoder/scrape.mjs

# 从面经话题抓 10 页,连续两页全部早于指定日期时自动停止
node .claude/skills/scrape-nowcoder/scrape.mjs --topic "https://www.nowcoder.com/?type=818_1" --pages 10 --since "2026-08-12"

# 抓 creation/subject 无限滚动话题:初始可见页 + 9 次加载
node .claude/skills/scrape-nowcoder/scrape.mjs --topic "https://www.nowcoder.com/creation/subject/14710425d5b74593b2ef7103d293606f" --pages 10

# 只取 subject 首屏前 3 篇做流水线冒烟测试
node .claude/skills/scrape-nowcoder/scrape.mjs --topic "https://www.nowcoder.com/creation/subject/14710425d5b74593b2ef7103d293606f" --pages 1 --limit 3

# 首页推荐流连续滚动 3 个批次,只保留 AI 相关内容
node .claude/skills/scrape-nowcoder/scrape.mjs --home --pages 3 --keyword "AI"

# 面经分类搜索:搜"字节跳动 后端 面经",抓 5 页
node .claude/skills/scrape-nowcoder/scrape.mjs --search "字节跳动 后端 面经" --pages 5

# 搜索"面"并逐篇按详情发布日期筛选已召回的 2026 年 7 月候选
node .claude/skills/scrape-nowcoder/scrape.mjs --search "面" --pages 50 --since "2026-07-01" --until "2026-07-31" --out ".claude/skills/scrape-nowcoder/nowcoder-output-2026-07-search"

# 面经分类搜索:搜 Redis 八股
node .claude/skills/scrape-nowcoder/scrape.mjs --search "Redis 面经 八股" --pages 3

# 指定端口
node .claude/skills/scrape-nowcoder/scrape.mjs --port 9333

Read the full file on GitHub · 200 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 200 lines · 92 tokens per session scan A 1fb9caa3c164

Subscribe to this mod's changes

scrape-nowcoder is a skill published in the GitHub repository ranxi2001/zero2Agent (367 stars, last pushed 2d ago), licensed MIT. It adds 92 tokens to every session and 3,503 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

hive.browser-automation

Required before any hive-browser CLI command. The browser is driven from the terminal by running hive-browser ... --json via terminalexec — not via MCP tools. Teaches the browser lifecycle rules (the bridge attaches to the USER'S running Chrome — never kill or launch browser processes; timeouts are transport issues…

aden-hive/hive · 142 tokens

hive.linkedin-automation

Read before automating LinkedIn with browser tools. LinkedIn combines shadow DOM (#interop-outlet), strict Trusted Types CSP that silently drops innerHTML, Lexical composer, native beforeunload dialogs that hang the bridge, and aggressive spam filters — each has bitten us at least once. Verified flows for profile…

aden-hive/hive · 99 tokens

hive.x-automation

Read before automating X / Twitter with browser tools. Verified flows for post, reply, delete, search-and-engage, plus the Draft.js compose quirks that silently disable the send button. Includes the daily-reply and job-market-reply playbooks. Requires hive.browser-automation for the underlying screenshot + coordinate…

aden-hive/hive · 81 tokens

hive.slack-notifications-setup

Set up a Slack notification channel (Sentinel) for a colony by driving the browser — reuse or create the "Hive Sentinel" Slack app from a JSON manifest, install it, capture the bot + app tokens, create/select the channel via the Slack API, and turn Sentinel on so the colony can ping the user on Slack and accept…

aden-hive/hive · 136 tokens

browser-edge-cases

SOP for debugging browser automation failures on complex websites. Use when browser tools fail on specific sites like LinkedIn, Twitter/X, SPAs, or sites with Shadow DOM.

aden-hive/hive · 40 tokens

hive.telegram-notifications-setup

Set up a Telegram notification channel (Sentinel) for a colony by driving the browser — create a bot via @BotFather in Telegram Web, store its token, detect the chat to notify, and turn Sentinel on so the colony can ping the user on Telegram and accept replies. Use when the user asks to "set up Telegram…

aden-hive/hive · 121 tokens