RSSHub icon indicating copy to clipboard operation
RSSHub copied to clipboard

route /xiaohongshu/user stop working on a private RSSHub instance

Open IceCodeNew opened this issue 10 months ago • 5 comments

路由地址

/xiaohongshu/user/:user_id/:category/:routeParams?

完整路由地址

/xiaohongshu/user/6212f6160000000010006a0c/notes

相关文档

https://docs.rsshub.app/zh/routes/social-media#%E7%94%A8%E6%88%B7%E7%AC%94%E8%AE%B0-%E6%94%B6%E8%97%8F

预期是什么?

The private RSSHub instance is supposed to generate a working RSS feed for the notes of a Xiaohongshu user

实际发生了什么?

Error: Waiting for selector div.reds-tab-item:nth-child(2) failed: waitForFunction failed: frame got detached.

部署

自建

部署相关信息

OS: Linux, Node Version: v22.17.0, docker: v28.3.0, Git Hash: b03bf378

额外信息

Node Version: v22.17.0

Git Hash: b03bf378

Git Date: Mon, 30 Jun 2025 06:05:42 GMT

the rsshub container was launched with following env variables setting:
`--env 'XIAOHONGSHU_COOKIE=loadts=<redacted>;xsecappid=<redacted>;acw_tc=<redacted>;websectiga=<redacted>;webBuild=<redacted>;sec_poison_id=<redacted>;web_session=<redacted>;gid=<redacted>;a1=<redacted>;abRequestId=<redacted>;unread=<redacted>;webId=<redacted>'`

这不是重复的 issue

  • [x] 我已经搜索了 现有 issue,以确保该错误尚未被报告。

IceCodeNew avatar Jun 30 '25 12:06 IceCodeNew

Searching for maintainers:
  • /xiaohongshu/user/:user_id/:category/:routeParams?: @lotosbin @howerhe @rien7 @dddaniel1 @pseudoyu

To maintainers: if you are not willing to be disturbed, list your username in scripts/workflow/test-issue/call-maintainer.js. In this way, your username will be wrapped in an inline code block when tagged so you will not be notified.

If all routes can not be found, the issue will be closed automatically. Please use NOROUTE for a route-irrelevant issue or leave a comment if it is a mistake. 如果所有路由都无法匹配,issue 将会被自动关闭。如果 issue 和路由无关,请使用 NOROUTE 关键词,或者留下评论。我们会重新审核。

github-actions[bot] avatar Jun 30 '25 12:06 github-actions[bot]

重新获取并设置XIAOHONGSHU_COOKIE就行了

mengx8 avatar Jul 02 '25 03:07 mengx8

# old
       - XIAOHONGSHU_COOKIE=loadts=1751029508971;xsecappid=xhs-pc-web;acw_tc=0a<redacted>9b;                                                                  websectiga=59<redacted>cf;webBuild=4.68.0;sec_poison_id=f3<redacted>6d;web_session=04<redacted>c2;           gid=yj<redacted>i2;a1=19<redacted>00;abRequestId=f0<redacted>5b;unread=<redacted>;webId=f3<redacted>a5
# new
       - XIAOHONGSHU_COOKIE=loadts=1751436332317;xsecappid=xhs-pc-web;acw_tc=0a<redacted>aa;                                                                  websectiga=98<redacted>d6;webBuild=4.70.2;sec_poison_id=71<redacted>10;web_session=04<redacted>e2;           gid=yj<redacted>i2;a1=19<redacted>00;abRequestId=f0<redacted>5b;unread=<redacted>;webId=f3<redacted>a5

我试了一下,更新 cookie 不能解决这个问题。 @mengx8 最开始发现有这个问题的时候,距离我第一次在自己的 RSSHub 实例上支持抓取小红书内容才过去 5 天(实际问题发生的时间应该还更早) 我更新 cookie 前后的对比如上。但是报错信息还是一样的:

error: Error in /xiaohongshu/user/6212f6160000000010006a0c/notes: Error: Waiting for selector `div.reds-tab-item:nth-child(2)` failed: waitForFunction failed: frame got detached.
info: --> GET /xiaohongshu/user/6212f6160000000010006a0c/notes 503 45s
error: Error in /xiaohongshu/user/61cd60d800000000100043ba/notes: Error: Waiting for selector `div.reds-tab-item:nth-child(2)` failed: waitForFunction failed: frame got detached.
error: Error in /xiaohongshu/user/5f855626000000000101cd7b/notes: Error: Waiting for selector `div.reds-tab-item:nth-child(2)` failed: waitForFunction failed: frame got detached.
error: Error in /xiaohongshu/user/6211c92e00000000210221ac/notes: Error: Waiting for selector `div.reds-tab-item:nth-child(2)` failed: waitForFunction failed: frame got detached.
info: --> GET /xiaohongshu/user/61cd60d800000000100043ba/notes 503 45s
info: --> GET /xiaohongshu/user/5f855626000000000101cd7b/notes 503 46s
info: --> GET /xiaohongshu/user/6211c92e00000000210221ac/notes 503 46s

IceCodeNew avatar Jul 02 '25 06:07 IceCodeNew

我也遇到了,同样的问题!

812006303 avatar Jul 02 '25 14:07 812006303

小红书现在会在url后添加跟踪参数,如果不是app内点击,均会显示验证码,建议参考 https://github.com/JoeanAmier/XHS-Downloader 重写抓取逻辑

ghost avatar Sep 27 '25 16:09 ghost