npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@streamapp/xhs

v1.0.0

Published

落到小红书上的频率闸门(一次 recipe 运行 = 一次访问:搜索 / detail / 互动各算一次)。

Readme

说明(迁自 package.yaml 注释)

落到小红书上的频率闸门(一次 recipe 运行 = 一次访问:搜索 / detail / 互动各算一次)。

为什么是 6/分钟 + burst 5:2026-07-29 撞过一次登录墙,形态是几分钟内连续打了十来次 detail(拟人光标和 900ms 动作间隔全程开着,照样撞)。站点数的是频率,所以这里压的是 持续速率;burst 留 5 是因为真人本来就一阵一阵——连点五条笔记再去读十分钟,是正常节奏, 不该每条都罚站。

maxWaitMs 15s:前台点开一条笔记,等 3 秒是加载、等 90 秒是坏了。超过就明确告诉用户 "太快了,X 秒后再试",而不是转一个不会停的圈。

说明(迁自 manifests.yaml 注释)

小红书 — replay Tier-C DOM harvest sources(跑在用户自己的 Chrome 上)。登录态浏览器采集: 人性化滚动,运行期零 token。

login detect 的便宜那一半(xhs-home/xhs-search/xhs-detail/xhs-like 的 auth 块共用):这些 cookie(sessionCookies)一个都不在 ⇒ 一定没登录,不必开 tab;反过来不成立(cookie 在不代表 服务端还认),肯定判据仍是 recipe 的 loginCheck 选择器。

xhs-search 的 provides:[search-content] —— 加入 content-search provider 的 {mode:auto, provides:search-content} 扇出。

xhs-detail:单条笔记详情(图组/视频流/正文/评论)——登录态 tab 内调站点 feed 详情签名客户端。 on-open 懒加载 enrich 用,不进推荐/时间线,故 discoverable:false。

xhs-like:互动写入(点赞/收藏)——登录态 tab 内调站点签名接口写用户账户。knowingly 放宽 recipe 只读边界(Gap C,见 spec 2026-07-18 §2)。context-free——无需打开笔记,只要 noteId + action。 on-demand 互动,从不被调度;cadence_hint_seconds 的取值同 xhs-detail(实际不生效,schema 只是 要求正数)。