publishport-opencli 1.0.20 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/clis/12306/me.js +2 -2
- package/clis/12306/orders.js +3 -3
- package/clis/12306/passengers.js +3 -3
- package/clis/12306/price.js +1 -1
- package/clis/12306/stations.js +1 -1
- package/clis/12306/train.js +1 -1
- package/clis/12306/trains.js +1 -1
- package/clis/12306/utils.js +1 -1
- package/clis/1688/download.js +1 -1
- package/clis/1688/item.js +4 -4
- package/clis/1688/search.js +4 -4
- package/clis/1688/store.js +4 -4
- package/clis/1point3acres/forum.js +1 -1
- package/clis/1point3acres/forums.js +1 -1
- package/clis/1point3acres/notifications.js +1 -1
- package/clis/1point3acres/search.js +1 -1
- package/clis/1point3acres/thread.js +2 -2
- package/clis/1point3acres/user.js +1 -1
- package/clis/1point3acres/utils.js +2 -2
- package/clis/36kr/article.js +2 -2
- package/clis/36kr/hot.js +2 -2
- package/clis/36kr/news.js +1 -1
- package/clis/36kr/search.js +2 -2
- package/clis/51job/company.js +2 -2
- package/clis/51job/detail.js +2 -2
- package/clis/51job/hot.js +1 -1
- package/clis/51job/search.js +1 -1
- package/clis/51job/utils.js +7 -7
- package/clis/_atlassian/shared.js +9 -9
- package/clis/_shared/article/auth.js +4 -4
- package/clis/_shared/article/douban-md2draft.js +4 -4
- package/clis/_shared/article/format.js +1 -1
- package/clis/_shared/article/images.js +7 -7
- package/clis/_shared/article/login.js +1 -1
- package/clis/_shared/article/publish.js +11 -11
- package/clis/_shared/common.js +1 -1
- package/clis/_shared/content-guard.js +1 -1
- package/clis/_shared/desktop-commands.js +1 -1
- package/clis/_shared/file-inject.js +12 -12
- package/clis/_shared/self-hosted-sites.js +2 -2
- package/clis/_shared/site-auth.js +1 -1
- package/clis/_shared/token-auth.js +2 -2
- package/clis/_shared/video-publish.js +9 -9
- package/clis/amazon/offer.js +3 -3
- package/clis/amazon/product.js +5 -5
- package/clis/amazon/shared.js +6 -6
- package/clis/antigravity/_actions.js +13 -13
- package/clis/antigravity/audit-extras.js +10 -10
- package/clis/antigravity/delete.js +1 -1
- package/clis/antigravity/model.js +6 -6
- package/clis/antigravity/new.js +2 -2
- package/clis/antigravity/read.js +2 -2
- package/clis/antigravity/rename.js +1 -1
- package/clis/antigravity/send.js +3 -3
- package/clis/antigravity/serve.js +17 -17
- package/clis/antigravity/storage.js +6 -6
- package/clis/antigravity/watch.js +2 -2
- package/clis/apple-podcasts/episodes.js +1 -1
- package/clis/apple-podcasts/top.js +1 -1
- package/clis/apple-podcasts/utils.js +1 -1
- package/clis/archive/item.js +1 -1
- package/clis/archive/search.js +1 -1
- package/clis/archive/snapshots.js +1 -1
- package/clis/archive/wayback.js +1 -1
- package/clis/arxiv/author.js +1 -1
- package/clis/arxiv/utils.js +1 -1
- package/clis/autohome/brand.js +1 -1
- package/clis/autohome/score.js +1 -1
- package/clis/autohome/utils.js +1 -1
- package/clis/baijiahao/article.js +1 -1
- package/clis/baijiahao/lists.js +1 -1
- package/clis/baijiahao/login.js +1 -1
- package/clis/baijiahao/publish.js +9 -9
- package/clis/baijiahao/stats.js +1 -1
- package/clis/baijiahao/whoami.js +1 -1
- package/clis/band/bands.js +2 -2
- package/clis/band/mentions.js +2 -2
- package/clis/band/post.js +4 -4
- package/clis/band/posts.js +3 -3
- package/clis/barchart/flow.js +3 -3
- package/clis/barchart/greeks.js +2 -2
- package/clis/barchart/quote.js +3 -3
- package/clis/bbc/news.js +1 -1
- package/clis/bbc/topic.js +1 -1
- package/clis/bbc/utils.js +1 -1
- package/clis/bilibili/article.js +1 -1
- package/clis/bilibili/categories.js +1 -1
- package/clis/bilibili/coin.js +1 -1
- package/clis/bilibili/comment-del.js +1 -1
- package/clis/bilibili/comment-like.js +1 -1
- package/clis/bilibili/comment.js +1 -1
- package/clis/bilibili/comments.js +1 -1
- package/clis/bilibili/dm-list.js +1 -1
- package/clis/bilibili/dm-read.js +1 -1
- package/clis/bilibili/dm-send.js +1 -1
- package/clis/bilibili/download.js +2 -2
- package/clis/bilibili/drafts.js +1 -1
- package/clis/bilibili/dynamic-post.js +3 -3
- package/clis/bilibili/favorite-add.js +1 -1
- package/clis/bilibili/favorite.js +1 -1
- package/clis/bilibili/feed.js +2 -2
- package/clis/bilibili/follow.js +1 -1
- package/clis/bilibili/following.js +1 -1
- package/clis/bilibili/like.js +1 -1
- package/clis/bilibili/partitions.js +1 -1
- package/clis/bilibili/stats.js +1 -1
- package/clis/bilibili/subtitle.js +3 -3
- package/clis/bilibili/summary.js +1 -1
- package/clis/bilibili/topics.js +1 -1
- package/clis/bilibili/unfollow.js +1 -1
- package/clis/bilibili/upload.js +1 -1
- package/clis/bilibili/utils.js +10 -10
- package/clis/bilibili/video-drafts.js +1 -1
- package/clis/bilibili/video.js +1 -1
- package/clis/bloomberg/businessweek.js +4 -4
- package/clis/bloomberg/news.js +2 -2
- package/clis/bloomberg/utils.js +13 -13
- package/clis/bluesky/post.js +1 -1
- package/clis/bluesky/shared.js +11 -11
- package/clis/bluesky/whoami.js +1 -1
- package/clis/booking/search.js +2 -2
- package/clis/boss/accept.js +1 -1
- package/clis/boss/applied.js +1 -1
- package/clis/boss/auth.js +1 -1
- package/clis/boss/batchgreet.js +1 -1
- package/clis/boss/bossinfo.js +1 -1
- package/clis/boss/chatlist.js +1 -1
- package/clis/boss/chatmsg.js +1 -1
- package/clis/boss/cities.js +1 -1
- package/clis/boss/detail.js +1 -1
- package/clis/boss/exchange.js +1 -1
- package/clis/boss/greet.js +1 -1
- package/clis/boss/interviews.js +1 -1
- package/clis/boss/invite.js +1 -1
- package/clis/boss/joblist.js +1 -1
- package/clis/boss/mark.js +1 -1
- package/clis/boss/me.js +2 -2
- package/clis/boss/recommend.js +1 -1
- package/clis/boss/resumedelete.js +1 -1
- package/clis/boss/resumelist.js +1 -1
- package/clis/boss/resumeupload.js +11 -11
- package/clis/boss/search.js +1 -1
- package/clis/boss/send.js +1 -1
- package/clis/boss/sendresume.js +1 -1
- package/clis/boss/stats.js +1 -1
- package/clis/boss/unread.js +1 -1
- package/clis/boss/utils.js +13 -13
- package/clis/chaoxing/assignments.js +1 -1
- package/clis/chaoxing/exams.js +1 -1
- package/clis/chaoxing/utils.js +9 -9
- package/clis/chatgpt/ask.js +1 -1
- package/clis/chatgpt/auth.js +2 -2
- package/clis/chatgpt/detail.js +1 -1
- package/clis/chatgpt/image.js +1 -1
- package/clis/chatgpt/read.js +1 -1
- package/clis/chatgpt/send.js +1 -1
- package/clis/chatgpt/utils.js +59 -59
- package/clis/chatgpt-app/ask.js +1 -1
- package/clis/chatgpt-app/send.js +1 -1
- package/clis/chatwise/model.js +6 -6
- package/clis/chess/analyze.js +1 -1
- package/clis/chess/game.js +1 -1
- package/clis/chess/games.js +1 -1
- package/clis/chess/stats.js +1 -1
- package/clis/chess/utils.js +1 -1
- package/clis/claude/ask.js +2 -2
- package/clis/claude/detail.js +1 -1
- package/clis/claude/new.js +1 -1
- package/clis/claude/read.js +1 -1
- package/clis/claude/send.js +1 -1
- package/clis/claude/utils.js +23 -23
- package/clis/cnblogs/article.js +1 -1
- package/clis/cnblogs/login.js +1 -1
- package/clis/cnblogs/stats.js +7 -7
- package/clis/cnblogs/whoami.js +1 -1
- package/clis/codex/_actions.js +3 -3
- package/clis/codex/archive.js +1 -1
- package/clis/codex/ask.js +6 -6
- package/clis/codex/model.js +8 -8
- package/clis/codex/pin.js +1 -1
- package/clis/codex/rename.js +4 -4
- package/clis/codex/send.js +3 -3
- package/clis/codex/sidebar.js +1 -1
- package/clis/coingecko/categories.js +1 -1
- package/clis/coingecko/coin.js +1 -1
- package/clis/coingecko/derivatives.js +1 -1
- package/clis/coingecko/exchanges.js +1 -1
- package/clis/coingecko/global.js +1 -1
- package/clis/coingecko/trending.js +1 -1
- package/clis/confluence/search.js +1 -1
- package/clis/coupang/product.js +3 -3
- package/clis/coupang/utils.js +1 -1
- package/clis/crates/crate.js +1 -1
- package/clis/crates/search.js +1 -1
- package/clis/crates/utils.js +1 -1
- package/clis/csdn/article.js +13 -13
- package/clis/csdn/columns.js +1 -1
- package/clis/csdn/login.js +1 -1
- package/clis/csdn/stats.js +4 -4
- package/clis/csdn/whoami.js +1 -1
- package/clis/cto51/article.js +1 -1
- package/clis/cto51/whoami.js +1 -1
- package/clis/ctrip/flight.js +2 -2
- package/clis/ctrip/hotel-search.js +3 -3
- package/clis/ctrip/hotel-suggest.js +1 -1
- package/clis/ctrip/search.js +1 -1
- package/clis/ctrip/utils.js +6 -6
- package/clis/cursor/ask.js +5 -5
- package/clis/cursor/composer.js +2 -2
- package/clis/cursor/model.js +4 -4
- package/clis/cursor/send.js +2 -2
- package/clis/dblp/author.js +1 -1
- package/clis/dblp/paper.js +1 -1
- package/clis/dblp/search.js +1 -1
- package/clis/dblp/utils.js +1 -1
- package/clis/dblp/venue.js +1 -1
- package/clis/deepseek/ask.js +1 -1
- package/clis/deepseek/auth.js +2 -2
- package/clis/deepseek/detail.js +1 -1
- package/clis/deepseek/new.js +1 -1
- package/clis/deepseek/read.js +1 -1
- package/clis/deepseek/send.js +7 -7
- package/clis/deepseek/utils.js +25 -25
- package/clis/defillama/protocol.js +1 -1
- package/clis/defillama/protocols.js +1 -1
- package/clis/defillama/utils.js +1 -1
- package/clis/devto/auth.js +2 -2
- package/clis/devto/latest.js +1 -1
- package/clis/devto/publish.js +5 -5
- package/clis/devto/read.js +2 -2
- package/clis/devto/stats.js +3 -3
- package/clis/dianping/auth.js +2 -2
- package/clis/dianping/cityResolver.js +2 -2
- package/clis/dianping/search.js +1 -1
- package/clis/dianping/shop.js +1 -1
- package/clis/dianping/utils.js +1 -1
- package/clis/discord-app/delete.js +3 -3
- package/clis/discord-app/read.js +1 -1
- package/clis/discord-app/thread-read.js +1 -1
- package/clis/discord-web/auth.js +2 -2
- package/clis/discord-web/send.js +5 -5
- package/clis/dockerhub/image.js +1 -1
- package/clis/dockerhub/search.js +1 -1
- package/clis/dockerhub/utils.js +1 -1
- package/clis/dongchedi/koubei.js +1 -1
- package/clis/dongchedi/models.js +1 -1
- package/clis/dongchedi/score.js +1 -1
- package/clis/dongchedi/search.js +1 -1
- package/clis/dongchedi/series.js +1 -1
- package/clis/dongchedi/specs.js +1 -1
- package/clis/dongchedi/utils.js +1 -1
- package/clis/douban/article.js +3 -3
- package/clis/douban/auth.js +2 -2
- package/clis/douban/download.js +1 -1
- package/clis/douban/utils.js +23 -23
- package/clis/doubao/auth.js +3 -3
- package/clis/doubao/utils.js +39 -39
- package/clis/doubao-app/ask.js +1 -1
- package/clis/doubao-app/utils.js +4 -4
- package/clis/douyin/_shared/browser-fetch.js +7 -7
- package/clis/douyin/_shared/draft-cache.js +1 -1
- package/clis/douyin/_shared/imagex-upload.js +1 -1
- package/clis/douyin/_shared/sts2.js +1 -1
- package/clis/douyin/_shared/text-extra.js +1 -1
- package/clis/douyin/_shared/tos-upload.js +4 -4
- package/clis/douyin/_shared/transcode.js +1 -1
- package/clis/douyin/_shared/vod-upload.js +4 -4
- package/clis/douyin/draft.js +18 -18
- package/clis/douyin/drafts.js +1 -1
- package/clis/douyin/publish-image.js +12 -12
- package/clis/douyin/publish.js +9 -9
- package/clis/douyin/search.js +3 -3
- package/clis/douyin/videos.js +1 -1
- package/clis/eastmoney/_secid.js +1 -1
- package/clis/eastmoney/announcement.js +1 -1
- package/clis/eastmoney/article.js +1 -1
- package/clis/eastmoney/convertible.js +1 -1
- package/clis/eastmoney/etf.js +1 -1
- package/clis/eastmoney/holders.js +1 -1
- package/clis/eastmoney/index-board.js +1 -1
- package/clis/eastmoney/kline.js +1 -1
- package/clis/eastmoney/kuaixun.js +1 -1
- package/clis/eastmoney/longhu.js +1 -1
- package/clis/eastmoney/money-flow.js +1 -1
- package/clis/eastmoney/northbound.js +1 -1
- package/clis/eastmoney/quote.js +1 -1
- package/clis/eastmoney/rank.js +1 -1
- package/clis/eastmoney/sectors.js +1 -1
- package/clis/endoflife/product.js +1 -1
- package/clis/endoflife/utils.js +1 -1
- package/clis/facebook/comment.js +8 -8
- package/clis/facebook/feed.js +4 -4
- package/clis/facebook/like.js +5 -5
- package/clis/facebook/notifications.js +3 -3
- package/clis/facebook/post.js +11 -11
- package/clis/facebook/search.js +3 -3
- package/clis/flathub/app.js +1 -1
- package/clis/flathub/search.js +1 -1
- package/clis/flathub/utils.js +1 -1
- package/clis/flomo/memos.js +1 -1
- package/clis/gemini/deep-research-result.js +4 -4
- package/clis/gemini/deep-research.js +1 -1
- package/clis/gemini/detail.js +1 -1
- package/clis/gemini/history.js +1 -1
- package/clis/gemini/image.js +2 -2
- package/clis/gemini/status.js +1 -1
- package/clis/gemini/utils.js +43 -43
- package/clis/geogebra/hexagon.js +1 -1
- package/clis/geogebra/info.js +3 -3
- package/clis/geogebra/triangle.js +1 -1
- package/clis/geogebra/utils.js +11 -11
- package/clis/ghost/login.js +1 -1
- package/clis/ghost/shared.js +2 -2
- package/clis/gitee/auth.js +2 -2
- package/clis/github-trending/repos.js +1 -1
- package/clis/google/news.js +1 -1
- package/clis/google/search.js +2 -2
- package/clis/google/suggest.js +1 -1
- package/clis/google/trends.js +1 -1
- package/clis/google/utils.js +1 -1
- package/clis/goproxy/module.js +1 -1
- package/clis/goproxy/utils.js +1 -1
- package/clis/goproxy/versions.js +1 -1
- package/clis/gov-policy/recent.js +2 -2
- package/clis/gov-policy/search.js +2 -2
- package/clis/grok/ask.js +1 -1
- package/clis/grok/detail.js +1 -1
- package/clis/grok/image.js +8 -8
- package/clis/grok/pin.js +1 -1
- package/clis/grok/send.js +1 -1
- package/clis/grok/status.js +1 -1
- package/clis/grok/utils.js +21 -21
- package/clis/guazi/browse.js +1 -1
- package/clis/guazi/car.js +1 -1
- package/clis/guazi/utils.js +1 -1
- package/clis/hackernews/auth.js +2 -2
- package/clis/hackernews/comment.js +8 -8
- package/clis/hackernews/read.js +7 -7
- package/clis/hackernews/submit.js +7 -7
- package/clis/hashnode/auth.js +3 -3
- package/clis/hashnode/publish.js +14 -14
- package/clis/hf/auth.js +2 -2
- package/clis/hf/models.js +1 -1
- package/clis/hf/paper.js +1 -1
- package/clis/hf/spaces.js +1 -1
- package/clis/hf/top.js +1 -1
- package/clis/homebrew/cask.js +1 -1
- package/clis/homebrew/formula.js +1 -1
- package/clis/homebrew/popular.js +1 -1
- package/clis/homebrew/utils.js +1 -1
- package/clis/huodongxing/events.js +1 -1
- package/clis/hupu/detail.js +4 -4
- package/clis/hupu/hot.js +3 -3
- package/clis/hupu/reply.js +1 -1
- package/clis/hupu/search.js +1 -1
- package/clis/hupu/unlike.js +1 -1
- package/clis/hupu/utils.js +10 -10
- package/clis/imdb/person.js +2 -2
- package/clis/imdb/reviews.js +3 -3
- package/clis/imdb/search.js +2 -2
- package/clis/imdb/title.js +1 -1
- package/clis/imdb/top.js +1 -1
- package/clis/imdb/trending.js +1 -1
- package/clis/imdb/utils.js +13 -13
- package/clis/imooc/article.js +6 -6
- package/clis/imooc/login.js +1 -1
- package/clis/imooc/whoami.js +1 -1
- package/clis/indeed/job.js +2 -2
- package/clis/indeed/search.js +2 -2
- package/clis/indeed/utils.js +1 -1
- package/clis/infoq/article.js +2 -2
- package/clis/infoq/login.js +1 -1
- package/clis/infoq/whoami.js +1 -1
- package/clis/instagram/_shared/private-publish.js +4 -4
- package/clis/instagram/_shared/protocol-capture.js +9 -9
- package/clis/instagram/detail.js +3 -3
- package/clis/instagram/post.js +25 -25
- package/clis/instagram/reel.js +18 -18
- package/clis/instagram/story.js +4 -4
- package/clis/instagram/user.js +2 -2
- package/clis/jd/item.js +65 -65
- package/clis/jianshu/article.js +1 -1
- package/clis/jianshu/login.js +1 -1
- package/clis/jianshu/notebooks.js +1 -1
- package/clis/jianshu/whoami.js +1 -1
- package/clis/jianyu/search.js +6 -6
- package/clis/jianyu/shared/procurement-contract.js +1 -1
- package/clis/jike/api.js +6 -6
- package/clis/jike/auth.js +3 -3
- package/clis/jike/comment.js +1 -1
- package/clis/jike/create.js +6 -6
- package/clis/jike/feed.js +3 -3
- package/clis/jike/like.js +1 -1
- package/clis/jike/notifications.js +3 -3
- package/clis/jike/repost.js +13 -13
- package/clis/jike/search.js +3 -3
- package/clis/jimeng/auth.js +2 -2
- package/clis/jimeng/generate.js +10 -10
- package/clis/jira/shared.js +1 -1
- package/clis/juejin/article.js +4 -4
- package/clis/juejin/categories.js +1 -1
- package/clis/juejin/hot.js +1 -1
- package/clis/juejin/login.js +1 -1
- package/clis/juejin/recommend.js +1 -1
- package/clis/juejin/stats.js +3 -3
- package/clis/juejin/tags.js +1 -1
- package/clis/juejin/utils.js +1 -1
- package/clis/juejin/whoami.js +1 -1
- package/clis/ke/utils.js +4 -4
- package/clis/kimi/_utils.js +7 -7
- package/clis/kimi/audit-extras.js +14 -14
- package/clis/kimi/auth.js +3 -3
- package/clis/kimi/chat.js +15 -15
- package/clis/kimi/storage.js +5 -5
- package/clis/kimi/ui.js +13 -13
- package/clis/kimi/usage.js +3 -3
- package/clis/kuaishou/auth.js +1 -1
- package/clis/kuaishou/publish.js +6 -6
- package/clis/lesswrong/_helpers.js +5 -5
- package/clis/lesswrong/comments.js +5 -5
- package/clis/lichess/top.js +1 -1
- package/clis/lichess/user.js +1 -1
- package/clis/lichess/utils.js +1 -1
- package/clis/linkedin/comment.js +1 -1
- package/clis/linkedin/connect.js +11 -11
- package/clis/linkedin/create.js +5 -5
- package/clis/linkedin/follow.js +1 -1
- package/clis/linkedin/inbox.js +1 -1
- package/clis/linkedin/job-detail.js +3 -3
- package/clis/linkedin/like.js +1 -1
- package/clis/linkedin/notifications.js +1 -1
- package/clis/linkedin/people-search.js +1 -1
- package/clis/linkedin/post-comments.js +1 -1
- package/clis/linkedin/post-detail.js +1 -1
- package/clis/linkedin/profile-analytics.js +1 -1
- package/clis/linkedin/profile-api.js +13 -13
- package/clis/linkedin/profile-experience.js +1 -1
- package/clis/linkedin/profile-projects.js +1 -1
- package/clis/linkedin/profile-read.js +3 -3
- package/clis/linkedin/reply.js +1 -1
- package/clis/linkedin/repost.js +1 -1
- package/clis/linkedin/safe-send.js +8 -8
- package/clis/linkedin/salesnav-inbox.js +5 -5
- package/clis/linkedin/salesnav-message.js +3 -3
- package/clis/linkedin/salesnav-search.js +4 -4
- package/clis/linkedin/salesnav-thread.js +1 -1
- package/clis/linkedin/search-api.js +3 -3
- package/clis/linkedin/search.js +8 -8
- package/clis/linkedin/social-api.js +31 -31
- package/clis/linkedin/timeline.js +3 -3
- package/clis/linkedin-learning/search.js +2 -2
- package/clis/linkedin-learning/trending.js +2 -2
- package/clis/linux-do/feed.js +4 -4
- package/clis/linux-do/topic-content.js +8 -8
- package/clis/lobsters/domain.js +1 -1
- package/clis/lobsters/read.js +7 -7
- package/clis/maimai/auth.js +2 -2
- package/clis/maimai/search-talents.js +4 -4
- package/clis/manus/_utils.js +1 -1
- package/clis/mastodon/login.js +1 -1
- package/clis/mastodon/post.js +1 -1
- package/clis/mastodon/shared.js +12 -12
- package/clis/mastodon/whoami.js +1 -1
- package/clis/maven/artifact.js +1 -1
- package/clis/maven/search.js +1 -1
- package/clis/maven/utils.js +1 -1
- package/clis/mdn/search.js +1 -1
- package/clis/medium/article.js +5 -5
- package/clis/medium/login.js +1 -1
- package/clis/medium/stats.js +3 -3
- package/clis/medium/tag.js +1 -1
- package/clis/medium/whoami.js +1 -1
- package/clis/mubu/notes.js +1 -1
- package/clis/mubu/utils.js +15 -15
- package/clis/note/auth.js +2 -2
- package/clis/note/note-utils.js +2 -2
- package/clis/note/publish.js +8 -8
- package/clis/notebooklm/add-source.js +8 -8
- package/clis/notebooklm/create.js +1 -1
- package/clis/notebooklm/generate-slides.js +1 -1
- package/clis/notebooklm/notes-get.js +1 -1
- package/clis/notebooklm/rpc.js +8 -8
- package/clis/notebooklm/source-fulltext.js +1 -1
- package/clis/notebooklm/utils.js +10 -10
- package/clis/nowcoder/auth.js +2 -2
- package/clis/nowcoder/comment.js +1 -1
- package/clis/nowcoder/comments.js +1 -1
- package/clis/nowcoder/dm-list.js +1 -1
- package/clis/nowcoder/dm-read.js +1 -1
- package/clis/nowcoder/dm-send.js +1 -1
- package/clis/nowcoder/drafts.js +1 -1
- package/clis/nowcoder/inbox.js +1 -1
- package/clis/nowcoder/like.js +1 -1
- package/clis/nowcoder/my.js +1 -1
- package/clis/nowcoder/post.js +1 -1
- package/clis/nowcoder/utils.js +13 -13
- package/clis/npm/downloads.js +1 -1
- package/clis/npm/package.js +1 -1
- package/clis/npm/search.js +1 -1
- package/clis/npm/utils.js +1 -1
- package/clis/nuget/package.js +1 -1
- package/clis/nuget/search.js +1 -1
- package/clis/nuget/utils.js +1 -1
- package/clis/nvd/cve.js +1 -1
- package/clis/oeis/search.js +1 -1
- package/clis/oeis/sequence.js +1 -1
- package/clis/oeis/utils.js +1 -1
- package/clis/ones/common.js +6 -6
- package/clis/ones/enrich-tasks.js +1 -1
- package/clis/ones/my-tasks.js +1 -1
- package/clis/ones/resolve-labels.js +1 -1
- package/clis/ones/task-helpers.js +1 -1
- package/clis/ones/task.js +1 -1
- package/clis/ones/worklog.js +7 -7
- package/clis/openalex/search.js +1 -1
- package/clis/openalex/utils.js +1 -1
- package/clis/openalex/work.js +1 -1
- package/clis/openfda/drug-label.js +1 -1
- package/clis/openfda/food-recall.js +1 -1
- package/clis/openfda/utils.js +1 -1
- package/clis/openreview/author.js +1 -1
- package/clis/openreview/paper.js +1 -1
- package/clis/openreview/reviews.js +3 -3
- package/clis/openreview/search.js +1 -1
- package/clis/openreview/utils.js +1 -1
- package/clis/openreview/venue.js +1 -1
- package/clis/oschina/article.js +1 -1
- package/clis/oschina/catalogs.js +1 -1
- package/clis/oschina/login.js +1 -1
- package/clis/oschina/stats.js +6 -6
- package/clis/oschina/whoami.js +1 -1
- package/clis/osv/query.js +1 -1
- package/clis/osv/utils.js +1 -1
- package/clis/osv/vulnerability.js +1 -1
- package/clis/packagist/package.js +1 -1
- package/clis/packagist/search.js +1 -1
- package/clis/packagist/utils.js +1 -1
- package/clis/pinterest/api.js +1 -1
- package/clis/pinterest/auth.js +1 -1
- package/clis/pinterest/boards.js +1 -1
- package/clis/pinterest/client.js +6 -6
- package/clis/pinterest/publish.js +5 -5
- package/clis/pixiv/auth.js +2 -2
- package/clis/pixiv/download.js +1 -1
- package/clis/pixiv/illusts.js +1 -1
- package/clis/pixiv/search.js +1 -1
- package/clis/pixiv/utils.js +3 -3
- package/clis/powerchina/auth.js +2 -2
- package/clis/powerchina/search.js +1 -1
- package/clis/producthunt/browse.js +2 -2
- package/clis/producthunt/hot.js +2 -2
- package/clis/producthunt/posts.js +1 -1
- package/clis/producthunt/today.js +1 -1
- package/clis/producthunt/utils.js +1 -1
- package/clis/pypi/downloads.js +1 -1
- package/clis/pypi/package.js +1 -1
- package/clis/pypi/utils.js +1 -1
- package/clis/qiita/auth.js +1 -1
- package/clis/qiita/gql.js +6 -6
- package/clis/qiita/publish.js +4 -4
- package/clis/qiita/stats.js +4 -4
- package/clis/qoder/_utils.js +16 -16
- package/clis/qoder/composer.js +1 -1
- package/clis/qoder/quest.js +1 -1
- package/clis/qoder/ui.js +14 -14
- package/clis/quark/auth.js +2 -2
- package/clis/quark/utils.js +2 -2
- package/clis/quora/answer-comments.js +3 -3
- package/clis/quora/create-answer.js +4 -4
- package/clis/quora/create-question.js +3 -3
- package/clis/quora/shared.js +17 -17
- package/clis/quora/whoami.js +1 -1
- package/clis/qwen/ask.js +1 -1
- package/clis/qwen/auth.js +3 -3
- package/clis/qwen/detail.js +1 -1
- package/clis/qwen/image.js +5 -5
- package/clis/qwen/status.js +1 -1
- package/clis/qwen/utils.js +16 -16
- package/clis/reddit/home.js +3 -3
- package/clis/reddit/read.js +10 -10
- package/clis/reddit/reply.js +4 -4
- package/clis/reddit/submit.js +11 -11
- package/clis/reddit/subreddit-info.js +3 -3
- package/clis/reddit/subscribed.js +4 -4
- package/clis/reddit/whoami.js +2 -2
- package/clis/rednote/comments.js +1 -1
- package/clis/rednote/download.js +1 -1
- package/clis/rednote/feed.js +1 -1
- package/clis/rednote/note.js +1 -1
- package/clis/rednote/notifications.js +2 -2
- package/clis/rednote/search.js +2 -2
- package/clis/rest-countries/country.js +1 -1
- package/clis/rest-countries/region.js +1 -1
- package/clis/rest-countries/utils.js +1 -1
- package/clis/reuters/article-detail.js +1 -1
- package/clis/reuters/auth.js +3 -3
- package/clis/reuters/search.js +1 -1
- package/clis/reuters/utils.js +4 -4
- package/clis/rfc/rfc.js +1 -1
- package/clis/rfc/utils.js +1 -1
- package/clis/rubygems/gem.js +1 -1
- package/clis/rubygems/search.js +1 -1
- package/clis/rubygems/utils.js +1 -1
- package/clis/segmentfault/article.js +3 -3
- package/clis/segmentfault/channels.js +1 -1
- package/clis/segmentfault/login.js +1 -1
- package/clis/segmentfault/stats.js +4 -4
- package/clis/segmentfault/tags.js +1 -1
- package/clis/segmentfault/whoami.js +1 -1
- package/clis/semanticscholar/citations.js +1 -1
- package/clis/semanticscholar/paper.js +1 -1
- package/clis/semanticscholar/recommendations.js +1 -1
- package/clis/semanticscholar/search.js +1 -1
- package/clis/semanticscholar/utils.js +1 -1
- package/clis/sinafinance/news.js +1 -1
- package/clis/sinafinance/stock-rank.js +1 -1
- package/clis/sinafinance/stock.js +1 -1
- package/clis/slock/attachment-download.js +1 -1
- package/clis/slock/attachment-upload.js +7 -7
- package/clis/slock/attachment-url.js +1 -1
- package/clis/slock/auth-verify.js +1 -1
- package/clis/slock/bookmark-add.js +1 -1
- package/clis/slock/bookmark-remove.js +1 -1
- package/clis/slock/channel-action.js +1 -1
- package/clis/slock/channel-create.js +1 -1
- package/clis/slock/channel-files.js +1 -1
- package/clis/slock/channel-list.js +1 -1
- package/clis/slock/channel-mark.js +1 -1
- package/clis/slock/channel-members.js +1 -1
- package/clis/slock/channel-unarchive.js +1 -1
- package/clis/slock/dm-list.js +1 -1
- package/clis/slock/errors.js +1 -1
- package/clis/slock/in-page.js +28 -28
- package/clis/slock/inbox-done.js +5 -5
- package/clis/slock/inbox.js +1 -1
- package/clis/slock/message-read.js +22 -22
- package/clis/slock/message-search.js +10 -10
- package/clis/slock/message-send.js +25 -25
- package/clis/slock/reaction-add.js +1 -1
- package/clis/slock/reaction-remove.js +1 -1
- package/clis/slock/resolve.js +1 -1
- package/clis/slock/server-list.js +2 -2
- package/clis/slock/task-claim.js +4 -4
- package/clis/slock/task-convert.js +13 -13
- package/clis/slock/task-create.js +1 -1
- package/clis/slock/task-delete.js +5 -5
- package/clis/slock/task-get.js +5 -5
- package/clis/slock/task-list-server.js +4 -4
- package/clis/slock/task-list.js +5 -5
- package/clis/slock/task-status.js +3 -3
- package/clis/slock/task-unclaim.js +3 -3
- package/clis/slock/thread-follow.js +1 -1
- package/clis/slock/thread-state.js +1 -1
- package/clis/slock/unread-summary.js +5 -5
- package/clis/slock/whoami.js +1 -1
- package/clis/smzdm/search.js +3 -3
- package/clis/sohu/article.js +1 -1
- package/clis/sohu/attributes.js +1 -1
- package/clis/sohu/categories.js +1 -1
- package/clis/sohu/channels.js +1 -1
- package/clis/sohu/columns.js +1 -1
- package/clis/sohu/login.js +1 -1
- package/clis/sohu/stats.js +3 -3
- package/clis/sohu/topics.js +1 -1
- package/clis/sohu/whoami.js +1 -1
- package/clis/spotify/spotify.js +1 -1
- package/clis/stackoverflow/read.js +6 -6
- package/clis/stackoverflow/related.js +1 -1
- package/clis/stackoverflow/tag.js +1 -1
- package/clis/stackoverflow/user.js +1 -1
- package/clis/stackoverflow/utils.js +1 -1
- package/clis/steam/app.js +1 -1
- package/clis/steam/search.js +1 -1
- package/clis/steam/utils.js +1 -1
- package/clis/substack/auth.js +2 -2
- package/clis/substack/post-utils.js +2 -2
- package/clis/substack/publish.js +5 -5
- package/clis/suno/auth.js +2 -2
- package/clis/suno/download.js +5 -5
- package/clis/suno/generate.js +3 -3
- package/clis/suno/list.js +1 -1
- package/clis/suno/status.js +1 -1
- package/clis/suno/utils.js +29 -29
- package/clis/telegram/send.js +7 -7
- package/clis/telegram/shared.js +2 -2
- package/clis/telegram/whoami.js +1 -1
- package/clis/test-utils.js +1 -1
- package/clis/threads/post.js +23 -23
- package/clis/threads/shared.js +3 -3
- package/clis/threads/whoami.js +1 -1
- package/clis/tieba/hot.js +3 -3
- package/clis/tieba/posts.js +1 -1
- package/clis/tieba/read.js +2 -2
- package/clis/tieba/search.js +3 -3
- package/clis/tieba/utils.js +1 -1
- package/clis/tiktok/comment.js +2 -2
- package/clis/tiktok/creator-videos.js +3 -3
- package/clis/tiktok/explore.js +3 -3
- package/clis/tiktok/follow.js +8 -8
- package/clis/tiktok/following.js +4 -4
- package/clis/tiktok/friends.js +7 -7
- package/clis/tiktok/live.js +3 -3
- package/clis/tiktok/notifications.js +6 -6
- package/clis/tiktok/publish.js +17 -17
- package/clis/tiktok/unfollow.js +4 -4
- package/clis/tiktok/user.js +2 -2
- package/clis/tiktok/utils.js +1 -1
- package/clis/toutiao/article.js +1 -1
- package/clis/toutiao/articles.js +2 -2
- package/clis/toutiao/auth.js +2 -2
- package/clis/toutiao/hot.js +1 -1
- package/clis/toutiao/recommend.js +1 -1
- package/clis/toutiao/utils.js +2 -2
- package/clis/trae-solo/_actions.js +4 -4
- package/clis/trae-solo/_fs.js +5 -5
- package/clis/trae-solo/_state.js +2 -2
- package/clis/trae-solo/automation.js +4 -4
- package/clis/trae-solo/mode.js +4 -4
- package/clis/trae-solo/model.js +4 -4
- package/clis/trae-solo/renderer-storage.js +4 -4
- package/clis/trae-solo/settings.js +1 -1
- package/clis/trae-solo/skill-fs.js +1 -1
- package/clis/trae-solo/skill.js +12 -12
- package/clis/trae-solo/state-fs.js +2 -2
- package/clis/trae-solo/task-fs.js +5 -5
- package/clis/trae-solo/workspaces-fs.js +1 -1
- package/clis/tumblr/auth.js +2 -2
- package/clis/tumblr/publish.js +3 -3
- package/clis/tvmaze/search.js +1 -1
- package/clis/tvmaze/show.js +1 -1
- package/clis/tvmaze/utils.js +1 -1
- package/clis/twitter/accept.js +7 -7
- package/clis/twitter/article.js +7 -7
- package/clis/twitter/bookmark-folder.js +3 -3
- package/clis/twitter/bookmark-folders.js +3 -3
- package/clis/twitter/bookmarks.js +4 -4
- package/clis/twitter/delete.js +5 -5
- package/clis/twitter/device-follow.js +3 -3
- package/clis/twitter/dm-list.js +1 -1
- package/clis/twitter/dm-read.js +1 -1
- package/clis/twitter/dm-send.js +5 -5
- package/clis/twitter/dm-shared.js +3 -3
- package/clis/twitter/download.js +6 -6
- package/clis/twitter/followers.js +5 -5
- package/clis/twitter/following.js +2 -2
- package/clis/twitter/like.js +3 -3
- package/clis/twitter/likes.js +8 -8
- package/clis/twitter/list-add-core.js +9 -9
- package/clis/twitter/list-create.js +5 -5
- package/clis/twitter/list-remove-core.js +9 -9
- package/clis/twitter/list-tweets.js +7 -7
- package/clis/twitter/lists.js +6 -6
- package/clis/twitter/notifications.js +2 -2
- package/clis/twitter/post.js +24 -24
- package/clis/twitter/profile.js +7 -7
- package/clis/twitter/quote.js +7 -7
- package/clis/twitter/reply-dm.js +7 -7
- package/clis/twitter/reply.js +12 -12
- package/clis/twitter/retweet.js +3 -3
- package/clis/twitter/scheduled-delete.js +3 -3
- package/clis/twitter/scheduled-list.js +2 -2
- package/clis/twitter/scheduled-utils.js +3 -3
- package/clis/twitter/search.js +5 -5
- package/clis/twitter/shared.js +6 -6
- package/clis/twitter/thread.js +4 -4
- package/clis/twitter/timeline.js +3 -3
- package/clis/twitter/trending.js +2 -2
- package/clis/twitter/tweets.js +11 -11
- package/clis/twitter/unlike.js +3 -3
- package/clis/twitter/unretweet.js +3 -3
- package/clis/twitter/utils.js +6 -6
- package/clis/upwork/detail.js +2 -2
- package/clis/upwork/feed.js +2 -2
- package/clis/upwork/search.js +2 -2
- package/clis/upwork/utils.js +1 -1
- package/clis/v2ex/auth.js +2 -2
- package/clis/v2ex/daily.js +3 -3
- package/clis/v2ex/me.js +2 -2
- package/clis/v2ex/notifications.js +2 -2
- package/clis/vk/post.js +1 -1
- package/clis/vk/shared.js +2 -2
- package/clis/vk/whoami.js +1 -1
- package/clis/web/read.js +8 -8
- package/clis/wechat-channels/auth.js +2 -2
- package/clis/wechat-channels/publish.js +30 -30
- package/clis/weibo/article.js +1 -1
- package/clis/weibo/auth.js +3 -3
- package/clis/weibo/comments.js +1 -1
- package/clis/weibo/delete.js +2 -2
- package/clis/weibo/feed.js +3 -3
- package/clis/weibo/hot.js +1 -1
- package/clis/weibo/publish.js +10 -10
- package/clis/weibo/search.js +2 -2
- package/clis/weibo/user-posts.js +3 -3
- package/clis/weibo/user.js +2 -2
- package/clis/weibo/utils.js +3 -3
- package/clis/weixin/article.js +1 -1
- package/clis/weixin/create-draft.js +26 -26
- package/clis/weixin/download.js +2 -2
- package/clis/weixin/login.js +1 -1
- package/clis/weixin/search.js +2 -2
- package/clis/weixin/stats.js +3 -3
- package/clis/weixin/whoami.js +1 -1
- package/clis/weread/ai-outline.js +2 -2
- package/clis/weread/book-search.js +2 -2
- package/clis/weread/book.js +2 -2
- package/clis/weread/notebooks.js +1 -1
- package/clis/weread/search.js +1 -1
- package/clis/weread/shelf.js +1 -1
- package/clis/weread/utils.js +6 -6
- package/clis/weread-official/book.js +1 -1
- package/clis/weread-official/discover.js +1 -1
- package/clis/weread-official/list-apis.js +1 -1
- package/clis/weread-official/notes.js +1 -1
- package/clis/weread-official/readdata.js +1 -1
- package/clis/weread-official/review.js +1 -1
- package/clis/weread-official/search.js +1 -1
- package/clis/weread-official/shelf.js +1 -1
- package/clis/weread-official/utils.js +1 -1
- package/clis/wikidata/entity.js +1 -1
- package/clis/wikidata/search.js +1 -1
- package/clis/wikidata/utils.js +1 -1
- package/clis/wikipedia/page.js +1 -1
- package/clis/wikipedia/trending.js +1 -1
- package/clis/wikipedia/utils.js +1 -1
- package/clis/wordpress/login.js +1 -1
- package/clis/wordpress/publish.js +1 -1
- package/clis/wordpress/shared.js +3 -3
- package/clis/wordpress/whoami.js +1 -1
- package/clis/woshipm/article.js +1 -1
- package/clis/woshipm/login.js +1 -1
- package/clis/woshipm/stats.js +4 -4
- package/clis/woshipm/whoami.js +1 -1
- package/clis/wttr/current.js +1 -1
- package/clis/wttr/forecast.js +1 -1
- package/clis/wttr/utils.js +1 -1
- package/clis/xianyu/collect.js +1 -1
- package/clis/xianyu/inbox.js +1 -1
- package/clis/xianyu/item-stats.js +2 -2
- package/clis/xianyu/location.js +1 -1
- package/clis/xianyu/manage.js +1 -1
- package/clis/xianyu/messages.js +1 -1
- package/clis/xianyu/mtop.js +5 -5
- package/clis/xianyu/order.js +1 -1
- package/clis/xianyu/promote-stats.js +2 -2
- package/clis/xianyu/publish.js +17 -17
- package/clis/xianyu/rate.js +1 -1
- package/clis/xianyu/reply.js +1 -1
- package/clis/xianyu/search.js +8 -8
- package/clis/xianyu/seller-data.js +1 -1
- package/clis/xianyu/seller-list.js +1 -1
- package/clis/xianyu/user.js +1 -1
- package/clis/xiaoe/catalog.js +2 -2
- package/clis/xiaoe/content.js +2 -2
- package/clis/xiaoe/courses.js +2 -2
- package/clis/xiaohongshu/ask.js +6 -6
- package/clis/xiaohongshu/comments.js +6 -6
- package/clis/xiaohongshu/creator-note-detail.js +7 -7
- package/clis/xiaohongshu/creator-notes-summary.js +1 -1
- package/clis/xiaohongshu/creator-notes.js +13 -13
- package/clis/xiaohongshu/creator-profile.js +2 -2
- package/clis/xiaohongshu/creator-stats.js +2 -2
- package/clis/xiaohongshu/delete-note.js +7 -7
- package/clis/xiaohongshu/download.js +4 -4
- package/clis/xiaohongshu/feed.js +2 -2
- package/clis/xiaohongshu/follow.js +3 -3
- package/clis/xiaohongshu/human.js +3 -3
- package/clis/xiaohongshu/note-helpers.js +1 -1
- package/clis/xiaohongshu/note.js +2 -2
- package/clis/xiaohongshu/notifications.js +1 -1
- package/clis/xiaohongshu/publish-video.js +8 -8
- package/clis/xiaohongshu/publish.js +59 -59
- package/clis/xiaohongshu/search.js +8 -8
- package/clis/xiaohongshu/unfollow.js +4 -4
- package/clis/xiaohongshu/user-helpers.js +1 -1
- package/clis/xiaohongshu/user.js +2 -2
- package/clis/xiaoyuzhou/auth.js +3 -3
- package/clis/xiaoyuzhou/download.js +1 -1
- package/clis/xiaoyuzhou/utils.js +1 -1
- package/clis/xueqiu/article.js +4 -4
- package/clis/xueqiu/comments.js +4 -4
- package/clis/xueqiu/danjuan-utils.js +4 -4
- package/clis/xueqiu/earnings-date.js +1 -1
- package/clis/xueqiu/events.js +3 -3
- package/clis/xueqiu/hashtags.js +3 -3
- package/clis/xueqiu/stocks.js +3 -3
- package/clis/xueqiu/users.js +3 -3
- package/clis/xueqiu/utils.js +3 -3
- package/clis/yahoo-finance/quote.js +1 -1
- package/clis/yollomi/background.js +1 -1
- package/clis/yollomi/edit.js +1 -1
- package/clis/yollomi/face-swap.js +1 -1
- package/clis/yollomi/generate.js +1 -1
- package/clis/yollomi/object-remover.js +1 -1
- package/clis/yollomi/remove-bg.js +1 -1
- package/clis/yollomi/restore.js +1 -1
- package/clis/yollomi/try-on.js +1 -1
- package/clis/yollomi/upload.js +4 -4
- package/clis/yollomi/upscale.js +1 -1
- package/clis/yollomi/utils.js +4 -4
- package/clis/yollomi/video.js +1 -1
- package/clis/youtube/channel.js +4 -4
- package/clis/youtube/feed.js +2 -2
- package/clis/youtube/like.js +5 -5
- package/clis/youtube/playlist.js +7 -7
- package/clis/youtube/publish.js +11 -11
- package/clis/youtube/search.js +3 -3
- package/clis/youtube/subscribe.js +7 -7
- package/clis/youtube/subscriptions.js +1 -1
- package/clis/youtube/transcript-group.js +2 -2
- package/clis/youtube/transcript.js +13 -13
- package/clis/youtube/unlike.js +5 -5
- package/clis/youtube/unsubscribe.js +7 -7
- package/clis/youtube/utils.js +3 -3
- package/clis/youtube/video.js +4 -4
- package/clis/youtube/watch-later.js +2 -2
- package/clis/yuanbao/ask.js +18 -18
- package/clis/yuanbao/detail.js +1 -1
- package/clis/yuanbao/read.js +1 -1
- package/clis/yuanbao/shared.js +9 -9
- package/clis/yuanbao/status.js +1 -1
- package/clis/yuque/article.js +1 -1
- package/clis/yuque/whoami.js +1 -1
- package/clis/zhihu/answer-comments.js +2 -2
- package/clis/zhihu/answer-detail.js +3 -3
- package/clis/zhihu/answer.js +1 -1
- package/clis/zhihu/article-transform.js +1 -1
- package/clis/zhihu/article.js +1 -1
- package/clis/zhihu/auth.js +2 -2
- package/clis/zhihu/collection.js +3 -3
- package/clis/zhihu/collections.js +3 -3
- package/clis/zhihu/download.js +2 -2
- package/clis/zhihu/image-profile.js +6 -6
- package/clis/zhihu/paginate.js +3 -3
- package/clis/zhihu/pin.js +4 -4
- package/clis/zhihu/question.js +3 -3
- package/clis/zhihu/recommend.js +3 -3
- package/clis/zhihu/search.js +3 -3
- package/clis/zhihu/stats.js +3 -3
- package/clis/zhihu/user-arg.js +1 -1
- package/clis/zhihu/write-shared.js +7 -7
- package/clis/zlibrary/utils.js +6 -6
- package/clis/zsxq/auth.js +3 -3
- package/clis/zsxq/search.js +1 -1
- package/clis/zsxq/topic.js +1 -1
- package/clis/zsxq/utils.js +5 -5
- package/dist/src/adapter-source.js +1 -1
- package/dist/src/browser/analyze.js +1 -1
- package/dist/src/browser/article-extract.js +2 -2
- package/dist/src/browser/ax-snapshot.js +2 -2
- package/dist/src/browser/base-page.js +25 -25
- package/dist/src/browser/bridge.js +1 -1
- package/dist/src/browser/cdp.js +1 -1
- package/dist/src/browser/daemon-client.js +1 -1
- package/dist/src/browser/daemon-lifecycle.js +7 -7
- package/dist/src/browser/dom-helpers.js +35 -35
- package/dist/src/browser/dom-snapshot.js +19 -19
- package/dist/src/browser/errors.js +3 -3
- package/dist/src/browser/extract.js +5 -5
- package/dist/src/browser/find.js +13 -13
- package/dist/src/browser/fingerprint.js +2 -2
- package/dist/src/browser/html-tree.js +6 -6
- package/dist/src/browser/managed-chrome.js +1 -1
- package/dist/src/browser/network-cache.js +1 -1
- package/dist/src/browser/network-key.js +1 -1
- package/dist/src/browser/page.js +7 -7
- package/dist/src/browser/profile.js +2 -2
- package/dist/src/browser/proxy-test.js +8 -8
- package/dist/src/browser/shape-filter.js +1 -1
- package/dist/src/browser/shape.js +1 -1
- package/dist/src/browser/stealth.js +3 -3
- package/dist/src/browser/tabs.js +2 -2
- package/dist/src/browser/target-errors.js +1 -1
- package/dist/src/browser/target-resolver.js +23 -23
- package/dist/src/browser/trace.js +2 -2
- package/dist/src/browser/utils.js +1 -1
- package/dist/src/browser/verify-fixture.js +2 -2
- package/dist/src/browser-session-lock.js +1 -1
- package/dist/src/build-manifest.js +11 -11
- package/dist/src/capabilityRouting.js +1 -1
- package/dist/src/cli-argv-preprocess.js +1 -1
- package/dist/src/cli.js +32 -32
- package/dist/src/commanderAdapter.js +3 -3
- package/dist/src/commands/auth.js +3 -3
- package/dist/src/commands/daemon.js +1 -1
- package/dist/src/completion-fast.js +1 -1
- package/dist/src/completion.js +1 -1
- package/dist/src/constants.js +1 -1
- package/dist/src/convention-audit.js +2 -2
- package/dist/src/daemon-utils.js +1 -1
- package/dist/src/daemon.js +1 -1
- package/dist/src/discovery.js +2 -2
- package/dist/src/doctor.js +9 -9
- package/dist/src/download/article-download.js +15 -15
- package/dist/src/download/index.js +4 -4
- package/dist/src/download/media-download.js +1 -1
- package/dist/src/download/progress.js +3 -3
- package/dist/src/electron-apps.js +1 -1
- package/dist/src/errors.js +2 -2
- package/dist/src/execution.js +2 -2
- package/dist/src/external.js +1 -1
- package/dist/src/help.js +8 -8
- package/dist/src/hooks.js +1 -1
- package/dist/src/interceptor.js +21 -21
- package/dist/src/launcher.js +7 -7
- package/dist/src/logger.js +8 -8
- package/dist/src/main.js +7 -7
- package/dist/src/observation/artifact.js +5 -5
- package/dist/src/observation/retention.js +1 -1
- package/dist/src/output.js +2 -2
- package/dist/src/package-paths.js +1 -1
- package/dist/src/pipeline/executor.js +1 -1
- package/dist/src/pipeline/registry.js +1 -1
- package/dist/src/pipeline/steps/browser.js +1 -1
- package/dist/src/pipeline/steps/download.js +1 -1
- package/dist/src/pipeline/steps/fetch.js +6 -6
- package/dist/src/pipeline/steps/intercept.js +1 -1
- package/dist/src/pipeline/steps/tap.js +17 -17
- package/dist/src/pipeline/steps/transform.js +1 -1
- package/dist/src/pipeline/template.js +1 -1
- package/dist/src/plugin-manifest.js +1 -1
- package/dist/src/plugin-scaffold.js +19 -19
- package/dist/src/plugin.js +12 -12
- package/dist/src/rate-limit.js +1 -1
- package/dist/src/registry.js +1 -1
- package/dist/src/runtime-detect.js +1 -1
- package/dist/src/runtime.js +1 -1
- package/dist/src/scripts/framework.js +1 -1
- package/dist/src/scripts/interact.js +1 -1
- package/dist/src/scripts/store.js +1 -1
- package/dist/src/serialization.js +2 -2
- package/dist/src/session-lease.js +1 -1
- package/dist/src/snapshotFormatter.js +2 -2
- package/dist/src/tui.js +12 -12
- package/dist/src/user-runtime.js +1 -1
- package/dist/src/utils.d.ts +12 -0
- package/dist/src/utils.js +4 -4
- package/dist/src/validate.js +2 -2
- package/dist/src/verify.js +2 -2
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{cli as
|
|
2
|
-
`).map((
|
|
3
|
-
const targetPaths = ${JSON.stringify(
|
|
1
|
+
import{cli as T,Strategy as E}from"@jackwener/opencli/registry";import{CommandExecutionError as s,EmptyResultError as S}from"@jackwener/opencli/errors";const p=/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/,d=[{label:"曝光数",section:"基础数据"},{label:"观看数",section:"基础数据"},{label:"封面点击率",section:"基础数据"},{label:"平均观看时长",section:"基础数据"},{label:"涨粉数",section:"基础数据"},{label:"点赞数",section:"互动数据"},{label:"评论数",section:"互动数据"},{label:"收藏数",section:"互动数据"},{label:"分享数",section:"互动数据"}],m=new Set(d.map((t)=>t.label)),O=new Set(d.map((t)=>t.section)),x=new Set(["切换笔记","笔记诊断","核心数据","观看来源","观众画像","提升建议","基础数据","互动数据","导出数据","实时","按小时","按天"]);function k(t){const e=t.indexOf("笔记数据详情");if(e<0)return"";for(let r=e+1;r<t.length;r++){const n=t[r];if(!n||n.startsWith("#")||p.test(n))continue;if(x.has(n))continue;return n}return""}function v(t,e){let r="",n="";for(let i=e+1;i<t.length;i++){const o=t[i];if(!o)continue;if(m.has(o))break;if(x.has(o)||o.startsWith("数据更新至")||o.startsWith("部分数据统计中"))continue;if(!r){r=o;continue}if(!n&&o.startsWith("粉丝")){n=o;break}if(o==="0"||/^\d/.test(o)||o.endsWith("%")||o.endsWith("秒"))break}return{value:r,extra:n}}function A(t){return t.match(/\b\d{4}-\d{2}-\d{2} \d{2}:\d{2}\b/)?.[0]??""}export function parseCreatorNoteDetailText(t,e){const r=t.split(`
|
|
2
|
+
`).map((a)=>a.trim()).filter(Boolean),n=k(r),i=r.find((a)=>p.test(a))??"",o=[{section:"笔记信息",metric:"note_id",value:e,extra:""},{section:"笔记信息",metric:"title",value:n,extra:""},{section:"笔记信息",metric:"published_at",value:i,extra:""}];for(const a of d){const c=r.indexOf(a.label);if(c<0)continue;const{value:u,extra:w}=v(r,c);o.push({section:a.section,metric:a.label,value:u,extra:w})}return o}export function parseCreatorNoteDetailDomData(t,e){if(!t)return[];const r=typeof t.title==="string"?t.title.trim():"",n=typeof t.infoText==="string"?t.infoText:"",i=Array.isArray(t.sections)?t.sections:[],o=[{section:"笔记信息",metric:"note_id",value:e,extra:""},{section:"笔记信息",metric:"title",value:r,extra:""},{section:"笔记信息",metric:"published_at",value:A(n),extra:""}];for(const c of i){if(!O.has(c.title))continue;for(const u of c.metrics){if(!m.has(u.label))continue;o.push({section:c.title,metric:u.label,value:u.value,extra:u.extra})}}return o.some((c)=>c.section!=="笔记信息"&&c.value)?o:[]}function g(t){return t==null?"":`${t}%`}function D(t,e){const r=e?.audienceSource?.source??[];for(const n of r){if(!n.title)continue;const i=[];if(n.info?.imp_count!=null)i.push(`曝光 ${n.info.imp_count}`);if(n.info?.view_count!=null)i.push(`观看 ${n.info.view_count}`);if(n.info?.interaction_count!=null)i.push(`互动 ${n.info.interaction_count}`);t.push({section:"观看来源",metric:n.title,value:g(n.value_with_double),extra:i.join(" · ")})}return t}function l(t,e,r){for(const n of r??[]){if(!n.title)continue;t.push({section:"观众画像",metric:`${e}/${n.title}`,value:g(n.value),extra:""})}return t}export function appendAudienceRows(t,e){D(t,e);l(t,"性别",e?.audienceSourceDetail?.gender);l(t,"年龄",e?.audienceSourceDetail?.age);l(t,"城市",e?.audienceSourceDetail?.city);l(t,"兴趣",e?.audienceSourceDetail?.interest);return t}function N(t,e){if(!t)return"";const n=new Date(t+28800000),i=(o)=>String(o).padStart(2,"0");if(e==="hour")return`${i(n.getUTCMonth()+1)}-${i(n.getUTCDate())} ${i(n.getUTCHours())}:00`;return`${n.getUTCFullYear()}-${i(n.getUTCMonth()+1)}-${i(n.getUTCDate())}`}function C(t,e){if(!t?.length)return"";return t.map((r)=>{const n=N(r.date,e),i=r.count_with_double??r.count;return n&&i!=null?`${n}=${i}`:""}).filter(Boolean).join(" | ")}const I=[{key:"imp_list",label:"曝光数"},{key:"view_list",label:"观看数"},{key:"view_time_list",label:"平均观看时长"},{key:"like_list",label:"点赞数"},{key:"comment_list",label:"评论数"},{key:"collect_list",label:"收藏数"},{key:"share_list",label:"分享数"},{key:"rise_fans_list",label:"涨粉数"}];export function appendTrendRows(t,e){if(e?.audienceTrend?.no_data_tip_msg)t.push({section:"趋势说明",metric:"观众趋势",value:e.audienceTrend.no_data?"暂不可用":"可用",extra:e.audienceTrend.no_data_tip_msg});const r=[{label:"按小时",granularity:"hour",data:e?.noteBase?.hour},{label:"按天",granularity:"day",data:e?.noteBase?.day}];for(const n of r)for(const i of I){const o=n.data?.[i.key],a=C(o,n.granularity);if(!a)continue;t.push({section:"趋势数据",metric:`${n.label}/${i.label}`,value:`${o.length} points`,extra:a})}return t}const f=[{suffix:"/api/galaxy/creator/datacenter/note/base",key:"noteBase"},{suffix:"/api/galaxy/creator/datacenter/note/analyze/audience/trend",key:"audienceTrend"},{suffix:"/api/galaxy/creator/datacenter/note/audience/source/detail",key:"audienceSourceDetail"},{suffix:"/api/galaxy/creator/datacenter/note/audience/source",key:"audienceSource"}],R=20,P=0.5;function L(t){if(!t)return null;try{const e=new URL(String(t),"https://creator.xiaohongshu.com");return f.find((r)=>e.pathname===r.suffix)??null}catch{return null}}function y(t,e){return Object.keys(t).find((r)=>L(r)?.suffix===e)}function h(t){return t!==null&&typeof t==="object"&&!Array.isArray(t)}function _(t,e,r){if(e in t&&!Array.isArray(t[e]))throw new s(`xiaohongshu creator-note-detail: signed API ${r} returned malformed ${e}`)}function b(t,e,r){if(e in t&&!h(t[e]))throw new s(`xiaohongshu creator-note-detail: signed API ${r} returned malformed ${e}`)}function H(t,e){const r=e.suffix;if(!h(t))throw new s(`xiaohongshu creator-note-detail: signed API ${r} returned a malformed payload`);if(e.key==="noteBase"){b(t,"hour",r);b(t,"day",r)}if(e.key==="audienceSource")_(t,"source",r);if(e.key==="audienceSourceDetail")for(const n of["gender","age","city","interest"])_(t,n,r);return t}function U(t,e){const r=e.suffix;if(!t||typeof t!=="object")throw new s(`xiaohongshu creator-note-detail: malformed capture for ${r}`);if(t.ok!==!0)throw new s(`xiaohongshu creator-note-detail: signed API ${r} returned HTTP ${t.status??"non-2xx"}`);if(typeof t.body!=="string")throw new s(`xiaohongshu creator-note-detail: signed API ${r} returned a non-text body`);try{const n=JSON.parse(t.body),i=h(n)&&Object.hasOwn(n,"data")?n.data:n;return H(i,e)}catch{throw new s(`xiaohongshu creator-note-detail: signed API ${r} returned invalid JSON or payload shape`)}}async function M(t){await t.evaluate(`(() => {
|
|
3
|
+
const targetPaths = ${JSON.stringify(f.map((e)=>e.suffix))};
|
|
4
4
|
const shouldCapture = (url) => {
|
|
5
5
|
try {
|
|
6
6
|
return targetPaths.includes(new URL(String(url), window.location.origin).pathname);
|
|
@@ -51,11 +51,11 @@ import{cli as v,Strategy as C}from"@jackwener/opencli/registry";import{CommandEx
|
|
|
51
51
|
if (key in OrigXHR) HookedXHR[key] = OrigXHR[key];
|
|
52
52
|
}
|
|
53
53
|
window.XMLHttpRequest = HookedXHR;
|
|
54
|
-
})()`)}async function
|
|
55
|
-
const target = '/statistics/note-detail?noteId=' + ${JSON.stringify(
|
|
54
|
+
})()`)}async function X(t,e){await M(t);await t.evaluate(`(() => {
|
|
55
|
+
const target = '/statistics/note-detail?noteId=' + ${JSON.stringify(e)};
|
|
56
56
|
history.pushState({}, '', target);
|
|
57
57
|
window.dispatchEvent(new PopStateEvent('popstate'));
|
|
58
|
-
})()`);const
|
|
58
|
+
})()`);const r=f.map((o)=>o.suffix);let n={};for(let o=0;o<R;o++){await t.wait(P);let a;try{a=await t.evaluate("JSON.stringify(window.__xhsCapture || {})");n=typeof a==="string"?JSON.parse(a):{}}catch{throw new s("xiaohongshu creator-note-detail: failed to read signed datacenter/note capture buffer")}if(!n||typeof n!=="object"||Array.isArray(n))throw new s("xiaohongshu creator-note-detail: malformed signed datacenter/note capture buffer");if(r.filter((u)=>y(n,u)).length===r.length)break}const i={};for(const o of f){const a=y(n,o.suffix);if(!a)continue;i[o.key]=U(n[a],o)}return Object.keys(i).length>0?i:null}async function j(t){const e=await t.evaluate(`() => {
|
|
59
59
|
const norm = (value) => (value || '').trim();
|
|
60
60
|
const sections = Array.from(document.querySelectorAll('.shell-container')).map((container) => {
|
|
61
61
|
const containerText = norm(container.innerText);
|
|
@@ -77,4 +77,4 @@ import{cli as v,Strategy as C}from"@jackwener/opencli/registry";import{CommandEx
|
|
|
77
77
|
infoText: norm(document.querySelector('.note-info-content')?.innerText),
|
|
78
78
|
sections,
|
|
79
79
|
};
|
|
80
|
-
}`);if(!
|
|
80
|
+
}`);if(!e||typeof e!=="object")return null;return e}export async function fetchCreatorNoteDetailRows(t,e){await t.goto("https://creator.xiaohongshu.com/statistics");const r=await X(t,e),n=await j(t).catch(()=>null);let i=parseCreatorNoteDetailDomData(n,e);if(i.length===0){const o=await t.evaluate("() => document.body.innerText");i=parseCreatorNoteDetailText(typeof o==="string"?o:"",e)}appendTrendRows(i,r??void 0);appendAudienceRows(i,r??void 0);return i}T({site:"xiaohongshu",name:"creator-note-detail",access:"read",description:"小红书单篇笔记详情页数据 (笔记信息 + 核心/互动数据 + 观看来源 + 观众画像 + 趋势数据)",domain:"creator.xiaohongshu.com",strategy:E.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"note-id",positional:!0,type:"string",required:!0,help:"Note ID (from creator-notes or note-detail page URL)"}],columns:["section","metric","value","extra"],func:async(t,e)=>{const r=e["note-id"],n=await fetchCreatorNoteDetailRows(t,r);if(!n.some((o)=>o.section!=="笔记信息"&&o.value))throw new S("xiaohongshu creator-note-detail","No note detail data found. Check note_id and login status for creator.xiaohongshu.com.");return n}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as u,Strategy as m}from"@jackwener/opencli/registry";import{EmptyResultError as
|
|
1
|
+
import{cli as u,Strategy as m}from"@jackwener/opencli/registry";import{EmptyResultError as p}from"@jackwener/opencli/errors";import{fetchCreatorNotes as d}from"./creator-notes.js";import{fetchCreatorNoteDetailRows as f}from"./creator-note-detail.js";function r(e,i){return e.find((s)=>s.metric===i)?.value??""}function c(e,i,s){const o=e.filter((t)=>t.section===i&&t.metric.startsWith(s)&&t.value);if(o.length===0)return{label:"",value:""};const n=[...o].sort((t,l)=>parseFloat(l.value)-parseFloat(t.value))[0];return{label:n.metric.slice(s.length),value:n.value}}export function summarizeCreatorNote(e,i,s){const o=c(i,"观看来源",""),a=c(i,"观众画像","兴趣/");return{rank:s,id:e.id,title:e.title,published_at:r(i,"published_at")||e.date,views:r(i,"观看数")||String(e.views),likes:r(i,"点赞数")||String(e.likes),collects:r(i,"收藏数")||String(e.collects),comments:r(i,"评论数")||String(e.comments),shares:r(i,"分享数"),avg_view_time:r(i,"平均观看时长"),rise_fans:r(i,"涨粉数"),top_source:o.label,top_source_pct:o.value,top_interest:a.label,top_interest_pct:a.value,url:e.url}}u({site:"xiaohongshu",name:"creator-notes-summary",access:"read",description:"小红书最近笔记批量摘要 (列表 + 单篇关键数据汇总)",domain:"creator.xiaohongshu.com",strategy:m.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"limit",type:"int",default:3,help:"Number of recent notes to summarize"},{name:"timeout",type:"int",required:!1,default:180,help:"Max seconds for the overall command (default: 180)"}],columns:["rank","id","title","views","likes","collects","comments","shares","avg_view_time","rise_fans","top_source","top_interest","url"],func:async(e,i)=>{const s=i.limit||3,o=await d(e,s);if(!o.length)throw new p("xiaohongshu creator-notes-summary","No notes found. Ensure you are logged into creator.xiaohongshu.com and the account has published notes.");const a=[];for(const[n,t]of o.entries()){if(n>0)await e.wait({time:1+Math.random()*2});if(!t.id){a.push({rank:n+1,id:t.id,title:t.title,published_at:t.date,views:String(t.views),likes:String(t.likes),collects:String(t.collects),comments:String(t.comments),shares:"",avg_view_time:"",rise_fans:"",top_source:"",top_source_pct:"",top_interest:"",top_interest_pct:"",url:t.url});continue}const l=await f(e,t.id);a.push(summarizeCreatorNote(t,l,n+1))}return a}});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{cli as
|
|
2
|
-
`).map((
|
|
1
|
+
import{cli as k,Strategy as v}from"@jackwener/opencli/registry";import{CommandExecutionError as x,EmptyResultError as S}from"@jackwener/opencli/errors";const R=/^发布于 (\d{4}年\d{2}月\d{2}日 \d{2}:\d{2})$/,M=/^\d+$/,H=/可见$/,E="/api/galaxy/creator/datacenter/note/analyze/list",b=10,A=20,N=0.5,O="https://creator.xiaohongshu.com/statistics/note-detail",L=/"noteId":"([0-9a-f]{24})"/g;function w(e){return e?`${O}?noteId=${encodeURIComponent(e)}`:""}function P(e){if(!e)return"";const t=new Date(e+28800000),r=(a)=>String(a).padStart(2,"0");return`${t.getUTCFullYear()}年${r(t.getUTCMonth()+1)}月${r(t.getUTCDate())}日 ${r(t.getUTCHours())}:${r(t.getUTCMinutes())}`}export function parseCreatorNotesText(e){const t=e.split(`
|
|
2
|
+
`).map((n)=>n.trim()).filter(Boolean),r=[],a=new Set;for(let n=0;n<t.length;n++){const o=t[n].match(R);if(!o)continue;let s=n-1;while(s>=0&&H.test(t[s]))s--;if(s<0)continue;const l=t[s],c=[];let i=n+1;while(i<t.length&&M.test(t[i])&&c.length<5){c.push(parseInt(t[i],10));i++}if(c.length<4)continue;const u=`${l}@@${o[1]}`;if(a.has(u))continue;a.add(u);r.push({id:"",title:l,date:o[1],views:c[0]??0,likes:c[2]??0,collects:c[3]??0,comments:c[1]??0,url:""});n=i-1}return r}export function parseCreatorNoteIdsFromHtml(e){const t=[],r=new Set;for(const a of e.matchAll(L)){const n=a[1];if(!n||r.has(n))continue;r.add(n);t.push(n)}return t}function U(e){return e.map((t)=>({id:t.id,title:t.title,date:t.date,views:t.metrics[0]??0,likes:t.metrics[2]??0,collects:t.metrics[3]??0,comments:t.metrics[1]??0,url:w(t.id)}))}function T(e){return(e??[]).map((t)=>({id:t.id??"",title:t.title??"",date:P(t.post_time),views:t.read_count??0,likes:t.like_count??0,collects:t.fav_count??0,comments:t.comment_count??0,url:w(t.id)}))}function f(e){if(e&&typeof e==="object"&&!Array.isArray(e)&&"session"in e&&"data"in e)return e.data;return e}async function q(e){await e.evaluate(`(() => {
|
|
3
3
|
window.__xhsCapture = {};
|
|
4
4
|
if (window.__xhsCaptureInstalled) return;
|
|
5
5
|
window.__xhsCaptureInstalled = true;
|
|
@@ -39,7 +39,7 @@ import{cli as M,Strategy as L}from"@jackwener/opencli/registry";import{CommandEx
|
|
|
39
39
|
if (key in OrigXHR) HookedXHR[key] = OrigXHR[key];
|
|
40
40
|
}
|
|
41
41
|
window.XMLHttpRequest = HookedXHR;
|
|
42
|
-
})()`)}function
|
|
42
|
+
})()`)}function y(e){const t=f(e);if(typeof t==="string")try{return JSON.parse(t)}catch{return{}}if(t&&typeof t==="object"&&!Array.isArray(t))return t;return{}}function C(e){try{const a=new URL(e,"https://creator.xiaohongshu.com"),n=Number.parseInt(a.searchParams.get("page_num")||"",10);if(Number.isFinite(n)&&n>0)return n}catch{}const t=String(e||"").match(/[?&]page_num=(\d+)/),r=Number.parseInt(t?.[1]||"",10);return Number.isFinite(r)&&r>0?r:Number.MAX_SAFE_INTEGER}function _(e){const t=[],r=new Set;let a=0;const n=Object.entries(e).filter(([o])=>o.includes("/note/analyze/list")).sort(([o],[s])=>C(o)-C(s));for(const[o,s]of n){if(!s?.ok)continue;try{const c=JSON.parse(s.body)?.data??{};if(typeof c.total==="number"&&c.total>a)a=c.total;for(const i of c.note_infos??[]){if(!i?.id||r.has(i.id))continue;r.add(i.id);t.push(i)}}catch{}}return{items:t,total:a}}function I(e,t,r){if(t<=0)return!0;return e.length>=Math.min(t,r)}async function D(e){let t={};for(let r=0;r<A;r++){await e.wait(N);const a=await e.evaluate("JSON.stringify(window.__xhsCapture || {})");t=y(a);if(Object.keys(t).some((n)=>n.includes("/note/analyze/list")))break}return t}async function X(e,t){const r=new Map,a=async()=>{const o=f(await e.evaluate(`() => {
|
|
43
43
|
const noteIdRe = /"noteId":"([0-9a-f]{24})"/;
|
|
44
44
|
return Array.from(document.querySelectorAll('div.note[data-impression], div.note')).map((card) => {
|
|
45
45
|
const impression = card.getAttribute('data-impression') || '';
|
|
@@ -47,7 +47,7 @@ import{cli as M,Strategy as L}from"@jackwener/opencli/registry";import{CommandEx
|
|
|
47
47
|
const title = (card.querySelector('.title, .raw')?.innerText || '').trim();
|
|
48
48
|
return { id, title };
|
|
49
49
|
}).filter((entry) => entry.id && entry.title);
|
|
50
|
-
}`));for(const
|
|
50
|
+
}`));for(const s of Array.isArray(o)?o:[])if(!r.has(s.id))r.set(s.id,s.title)},n=async()=>{return f(await e.evaluate(`(() => {
|
|
51
51
|
const firstCard = document.querySelector('div.note[data-impression]');
|
|
52
52
|
let el = firstCard && firstCard.parentElement;
|
|
53
53
|
while (el) {
|
|
@@ -59,11 +59,11 @@ import{cli as M,Strategy as L}from"@jackwener/opencli/registry";import{CommandEx
|
|
|
59
59
|
el = el.parentElement;
|
|
60
60
|
}
|
|
61
61
|
return false;
|
|
62
|
-
})()`))};try{await
|
|
62
|
+
})()`))};try{await e.goto("https://creator.xiaohongshu.com/new/note-manager");for(let o=0;o<12;o++){await e.wait(1);await a();if(r.size>=t)return r;await n()}return r}catch{return r}}async function z(e,t){await e.goto("https://creator.xiaohongshu.com/statistics");await q(e);await e.evaluate(`(() => {
|
|
63
63
|
history.pushState({}, '', '/statistics/data-analysis?source=official');
|
|
64
64
|
window.dispatchEvent(new PopStateEvent('popstate'));
|
|
65
|
-
})()`);let
|
|
66
|
-
const target = String(${
|
|
65
|
+
})()`);let r=await D(e),{items:a,total:n}=_(r);if(a.length===0)return[];const o=n>0?Math.ceil(n/b):1,s=Math.min(o,Math.ceil(t/b));for(let i=2;i<=s&&a.length<t;i++){if(!f(await e.evaluate(`(() => {
|
|
66
|
+
const target = String(${i});
|
|
67
67
|
// .d-pagination-page renders the page number doubled (a visible span +
|
|
68
68
|
// an accessibility span), so textContent for page 2 reads "22". Match
|
|
69
69
|
// both the raw digit and the doubled form to tolerate either render.
|
|
@@ -74,24 +74,24 @@ import{cli as M,Strategy as L}from"@jackwener/opencli/registry";import{CommandEx
|
|
|
74
74
|
});
|
|
75
75
|
if (match) { match.click(); return true; }
|
|
76
76
|
return false;
|
|
77
|
-
})()`)))break;const
|
|
77
|
+
})()`)))break;const h=a.length;let d=!1;for(let p=0;p<A;p++){await e.wait(N);const m=await e.evaluate("JSON.stringify(window.__xhsCapture || {})");r=y(m);const g=_(r);if(g.items.length>h){a=g.items;n=Math.max(n,g.total);d=!0;break}}if(!d)break}if(!I(a,n,t))throw new x(`xiaohongshu creator-notes: captured ${a.length} of ${Math.min(n,t)} expected analyze rows; refusing partial results`);const l=T(a).slice(0,t);if(l.filter((i)=>!i.title).length>0){const i=await X(e,l.length);for(const u of l)if(!u.title&&u.id&&i.has(u.id))u.title=i.get(u.id)}return l}async function F(e,t){const r=Math.min(Math.max(t,10),20),a=Math.max(1,Math.ceil(t/r)),n=[];await e.goto(`https://creator.xiaohongshu.com/statistics/data-analysis?type=0&page_size=${r}&page_num=1`);for(let o=1;o<=a&&n.length<t;o++){const s=`${E}?type=0&page_size=${r}&page_num=${o}`;let c=(await e.evaluate(`
|
|
78
78
|
async () => {
|
|
79
79
|
try {
|
|
80
|
-
const resp = await fetch(${JSON.stringify(
|
|
80
|
+
const resp = await fetch(${JSON.stringify(s)}, { credentials: 'include' });
|
|
81
81
|
if (!resp.ok) return { error: 'HTTP ' + resp.status };
|
|
82
82
|
return await resp.json();
|
|
83
83
|
} catch (e) {
|
|
84
84
|
return { error: e?.message ?? String(e) };
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
`))?.data?.note_infos??[];if(!
|
|
87
|
+
`))?.data?.note_infos??[];if(!c.length){await e.installInterceptor(E);await e.evaluate(`
|
|
88
88
|
async () => {
|
|
89
89
|
try {
|
|
90
|
-
await fetch(${JSON.stringify(
|
|
90
|
+
await fetch(${JSON.stringify(s)}, { credentials: 'include' });
|
|
91
91
|
} catch {}
|
|
92
92
|
return true;
|
|
93
93
|
}
|
|
94
|
-
`);await
|
|
94
|
+
`);await e.wait(1);c=(await e.getInterceptedRequests()).find((h)=>Array.isArray(h?.data?.note_infos))?.data?.note_infos??[]}if(!c.length)break;n.push(...T(c));if(c.length<r)break}return n.slice(0,t)}export async function fetchCreatorNotes(e,t){let r=[];try{r=await z(e,t)}catch(a){if(a instanceof x)throw a}if(r.length===0)r=await F(e,t);if(r.length===0){await e.goto("https://creator.xiaohongshu.com/new/note-manager");const a=Math.max(0,Math.ceil(t/10)+1);for(let n=0;n<=a;n++){const o=await e.evaluate(`() => {
|
|
95
95
|
const noteIdRe = /"noteId":"([0-9a-f]{24})"/;
|
|
96
96
|
return Array.from(document.querySelectorAll('div.note[data-impression], div.note')).map((card) => {
|
|
97
97
|
const impression = card.getAttribute('data-impression') || '';
|
|
@@ -104,4 +104,4 @@ import{cli as M,Strategy as L}from"@jackwener/opencli/registry";import{CommandEx
|
|
|
104
104
|
.filter((value) => Number.isFinite(value));
|
|
105
105
|
return { id, title, date, metrics };
|
|
106
106
|
});
|
|
107
|
-
}`),
|
|
107
|
+
}`),s=U(Array.isArray(o)?o:[]).filter((d)=>d.title&&d.date);if(s.length>0)r=s;if(r.length>=t||r.length>0&&n===0)break;const l=await e.evaluate("() => ({ text: document.body.innerText, html: document.body.innerHTML })"),c=typeof l?.text==="string"?l.text:"",i=typeof l?.html==="string"?l.html:"",u=parseCreatorNotesText(c),h=parseCreatorNoteIdsFromHtml(i);r=u.map((d,p)=>{const m=h[p]??"";return{...d,id:m,url:w(m)}});if(r.length>=t||n===a)break;await e.pressKey("PageDown");await e.wait(1)}}return r.slice(0,t)}k({site:"xiaohongshu",name:"creator-notes",access:"read",description:"小红书创作者笔记列表 + 每篇数据 (标题/日期/观看/点赞/收藏/评论)",domain:"creator.xiaohongshu.com",strategy:v.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"limit",type:"int",default:20,help:"Number of notes to return"}],columns:["rank","id","title","date","views","likes","collects","comments","url"],func:async(e,t)=>{const r=t.limit||20,a=await fetchCreatorNotes(e,r);if(!Array.isArray(a)||a.length===0)throw new S("xiaohongshu creator-notes","No notes found. Ensure you are logged into creator.xiaohongshu.com and the account has published notes.");return a.slice(0,r).map((n,o)=>({rank:o+1,id:n.id,title:n.title,date:n.date,views:n.views,likes:n.likes,collects:n.collects,comments:n.comments,url:n.url}))}});export const __test__={harvestAnalyzeListCaptures:_,isAnalyzeCaptureComplete:I,parseCaptureMapPayload:y,unwrapEvaluateResult:f};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cli as t,Strategy as
|
|
1
|
+
import{cli as t,Strategy as s}from"@jackwener/opencli/registry";t({site:"xiaohongshu",name:"creator-profile",access:"read",description:"小红书创作者账号信息 (粉丝/关注/获赞/成长等级)",domain:"creator.xiaohongshu.com",strategy:s.COOKIE,browser:!0,navigateBefore:!1,args:[],columns:["field","value"],func:async(a,n)=>{await a.goto("https://creator.xiaohongshu.com/new/home");const r=await a.evaluate(`
|
|
2
2
|
async () => {
|
|
3
3
|
try {
|
|
4
4
|
const resp = await fetch('/api/galaxy/creator/home/personal_info', {
|
|
@@ -10,4 +10,4 @@ import{cli as t,Strategy as n}from"@jackwener/opencli/registry";t({site:"xiaohon
|
|
|
10
10
|
return { error: e.message };
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
`);if(
|
|
13
|
+
`);if(r?.error)throw Error(r.error+". Are you logged into creator.xiaohongshu.com?");if(!r?.data)throw Error("Unexpected response structure");const e=r.data,o=e.grow_info||{};return[{field:"Name",value:e.name??""},{field:"Followers",value:e.fans_count??0},{field:"Following",value:e.follow_count??0},{field:"Likes & Collects",value:e.faved_count??0},{field:"Creator Level",value:o.level??0},{field:"Level Progress",value:`${o.fans_count??0}/${o.max_fans_count??0} fans`},{field:"Bio",value:(e.personal_desc??"").replace(/\\n/g," | ")}]}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as c,Strategy as l}from"@jackwener/opencli/registry";import{EmptyResultError as m}from"@jackwener/opencli/errors";c({site:"xiaohongshu",name:"creator-stats",access:"read",description:"小红书创作者数据总览 (观看/点赞/收藏/评论/分享/涨粉,含每日趋势)",domain:"creator.xiaohongshu.com",strategy:l.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"period",type:"string",default:"seven",help:"Stats period: seven or thirty",choices:["seven","thirty"]}],columns:["metric","total","trend"],func:async(a,i)=>{const n=i.period||"seven";await a.goto("https://creator.xiaohongshu.com/new/home");const r=await a.evaluate(`
|
|
2
2
|
async () => {
|
|
3
3
|
try {
|
|
4
4
|
const resp = await fetch('/api/galaxy/creator/data/note_detail_new', {
|
|
@@ -10,4 +10,4 @@ import{cli as C,Strategy as D}from"@jackwener/opencli/registry";import{EmptyResu
|
|
|
10
10
|
return { error: e.message };
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
`);if(
|
|
13
|
+
`);if(r?.error)throw Error(r.error+". Are you logged into creator.xiaohongshu.com?");if(!r?.data)throw Error("Unexpected response structure");const t=r.data[n];if(!t)throw new m("xiaohongshu creator-stats",`No data for period "${n}". Available: ${Object.keys(r.data).join(", ")}`);const e=(o)=>{if(!o||!o.length)return"-";return o.map((s)=>s.count).join(" → ")};return[{metric:"观看数 (views)",total:t.view_count??0,trend:e(t.view_list)},{metric:"平均观看时长 (avg view time ms)",total:t.view_time_avg??0,trend:e(t.view_time_list)},{metric:"主页访问 (home views)",total:t.home_view_count??0,trend:e(t.home_view_list)},{metric:"点赞数 (likes)",total:t.like_count??0,trend:e(t.like_list)},{metric:"收藏数 (collects)",total:t.collect_count??0,trend:e(t.collect_list)},{metric:"评论数 (comments)",total:t.comment_count??0,trend:e(t.comment_list)},{metric:"弹幕数 (danmaku)",total:t.danmaku_count??0,trend:"-"},{metric:"分享数 (shares)",total:t.share_count??0,trend:e(t.share_list)},{metric:"涨粉数 (new followers)",total:t.rise_fans_count??0,trend:e(t.rise_fans_list)}]}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as I,Strategy as v}from"@jackwener/opencli/registry";import{ArgumentError as s,AuthRequiredError as k,CliError as S,CommandExecutionError as n,EmptyResultError as E}from"@jackwener/opencli/errors";const A="https://creator.xiaohongshu.com/new/note-manager",h=3000,L=2000,T=1e4,m=1000,w=/^[0-9a-f]{24}$/i;function l(e){if(e&&typeof e==="object"&&"session"in e&&"data"in e)return e.data;return e}function U(e,o){if(typeof e!=="string")throw new n(`xiaohongshu/delete-note: malformed ${o} payload`);return e}function g(e,o){if(typeof e!=="boolean")throw new n(`xiaohongshu/delete-note: malformed ${o} payload`);return e}function N(e,o){if(!e||typeof e!=="object"||Array.isArray(e))throw new n(`xiaohongshu/delete-note: malformed ${o} payload`);return e}function b(e,o){const t=N(e,o);if(typeof t.ok!=="boolean")throw new n(`xiaohongshu/delete-note: malformed ${o} payload`);return t}function C(e){const o=String(e||"").toLowerCase();return o==="xiaohongshu.com"||o.endsWith(".xiaohongshu.com")}function O(e){return e.hostname.toLowerCase()==="creator.xiaohongshu.com"&&e.pathname.replace(/\/+$/,"")==="/statistics/note-detail"}function p(e){const o=String(e??"").trim();if(!o)throw new s("xiaohongshu/delete-note: note-id cannot be empty");if(w.test(o))return o.toLowerCase();if(!/^https:\/\//i.test(o))throw new s("xiaohongshu/delete-note: note-id must be a 24-character Xiaohongshu note ID or an exact Xiaohongshu note URL");let t;try{t=new URL(o)}catch{throw new s("xiaohongshu/delete-note: invalid note URL")}if(t.protocol!=="https:"||t.username||t.password||t.port||!C(t.hostname))throw new s("xiaohongshu/delete-note: note URL must be an exact https://*.xiaohongshu.com URL");const r=t.searchParams.get("noteId")||t.searchParams.get("note_id");if(r&&w.test(r)&&O(t))return r.toLowerCase();const i=t.pathname.match(/^\/(?:explore|note|search_result|discovery\/item)\/([0-9a-f]{24})\/?$/i)||t.pathname.match(/^\/user\/profile\/[^/?#]+\/([0-9a-f]{24})\/?$/i);if(i)return i[1].toLowerCase();throw new s("xiaohongshu/delete-note: note URL must contain a 24-character note ID")}function x(e,o){return`
|
|
2
2
|
(cfg => {
|
|
3
3
|
const { targetId, shouldClick } = cfg;
|
|
4
4
|
const isVisible = (el) => !!el && el.offsetParent !== null;
|
|
@@ -27,8 +27,8 @@ import{cli as O,Strategy as k}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
return { ok: false, kind: 'not_found', visibleRows: notes.length };
|
|
30
|
-
})(${JSON.stringify({targetId:
|
|
31
|
-
`}function
|
|
30
|
+
})(${JSON.stringify({targetId:e,shouldClick:o})})
|
|
31
|
+
`}function y(e){return`
|
|
32
32
|
(targetId => {
|
|
33
33
|
const matchesNoteId = (impressionRaw) => {
|
|
34
34
|
if (!impressionRaw) return false;
|
|
@@ -42,8 +42,8 @@ import{cli as O,Strategy as k}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
42
42
|
};
|
|
43
43
|
const notes = Array.from(document.querySelectorAll('.note'));
|
|
44
44
|
return notes.some((n) => matchesNoteId(n.getAttribute('data-impression')));
|
|
45
|
-
})(${JSON.stringify(
|
|
46
|
-
`}
|
|
45
|
+
})(${JSON.stringify(e)})
|
|
46
|
+
`}I({site:"xiaohongshu",name:"delete-note",access:"write",description:"删除小红书已发布笔记 (creator center UI automation)",domain:"creator.xiaohongshu.com",strategy:v.COOKIE,navigateBefore:!1,browser:!0,args:[{name:"note-id",required:!0,positional:!0,help:"Note ID (e.g. 6a08ba0b000000000702a893 from xiaohongshu creator-notes / URL)"},{name:"execute",type:"boolean",default:!1,help:"Actually click delete + confirm. Default is dry-run target verification only."}],columns:["status","note_id","message"],func:async(e,o)=>{try{const t=p(o["note-id"]),r=o.execute===!0;await e.goto(A);await e.wait({time:h/1000});const i=U(l(await e.evaluate("() => location.href")),"current-url");if(typeof i==="string"&&/\/login(?:[/?#]|$)/i.test(new URL(i).pathname+new URL(i).search))throw new k("creator.xiaohongshu.com");const R=`
|
|
47
47
|
() => {
|
|
48
48
|
const isVisible = (el) => !!el && el.offsetParent !== null;
|
|
49
49
|
for (const el of document.querySelectorAll('a, button, [role="tab"], div')) {
|
|
@@ -55,7 +55,7 @@ import{cli as O,Strategy as k}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
55
55
|
}
|
|
56
56
|
return false;
|
|
57
57
|
}
|
|
58
|
-
`;let
|
|
58
|
+
`;let c=!1;for(let a=0;a<30;a++){c=g(l(await e.evaluate(R)),"published-tab");if(c)break;await e.wait({time:0.5})}if(!c)throw new n("xiaohongshu/delete-note: 已发布 tab not found on note-manager; xhs creator UI may have changed.");await e.wait({time:h/1000});const u=b(l(await e.evaluate(x(t,r))),"locate-note");if(!u?.ok){if(u?.kind==="not_found")throw new E("xiaohongshu/delete-note",`Note ${t} not visible in the 已发布 tab. Verify the note belongs to the logged-in account and has cleared review (审核中 / 未通过 rows have no web delete entry).`);if(u?.kind==="no_delete_action")throw new n(`xiaohongshu/delete-note: note ${t} row found but no delete action visible; xhs creator UI may have changed.`);throw new n("xiaohongshu/delete-note: failed to locate note row")}if(!r)return[{status:"dry-run",note_id:t,message:"Target note row and delete action verified. Re-run with --execute to delete."}];await e.wait({time:L/1000});const d=b(l(await e.evaluate(`
|
|
59
59
|
() => {
|
|
60
60
|
const isVisible = (el) => !!el && el.offsetParent !== null;
|
|
61
61
|
const footer = Array.from(document.querySelectorAll('.d-modal-footer')).find(isVisible);
|
|
@@ -66,4 +66,4 @@ import{cli as O,Strategy as k}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
66
66
|
confirmBtn.click();
|
|
67
67
|
return { ok: true };
|
|
68
68
|
}
|
|
69
|
-
`)),"confirm-modal");if(!
|
|
69
|
+
`)),"confirm-modal");if(!d?.ok)throw new n(`xiaohongshu/delete-note: confirmation modal step failed (${d?.kind??"unknown"})`);const _=Math.ceil(T/m);let f=!0;for(let a=0;a<_;a++){await e.wait({time:m/1000});if(g(l(await e.evaluate(y(t))),"verify-gone")===!1){f=!1;break}}if(f)throw new n(`xiaohongshu/delete-note: note ${t} still visible after confirm click; deletion may not have committed.`);return[{status:"deleted",note_id:t,message:"Delete confirmed and note row disappeared."}]}catch(t){if(t instanceof S)throw t;throw new n(`xiaohongshu/delete-note failed: ${t?.message??String(t)}`)}}});export const __test__={normalizeNoteId:p,buildLocateAndMaybeDeleteScript:x,buildVerifyGoneScript:y};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as c,Strategy as l}from"@jackwener/opencli/registry";import{formatCookieHeader as d}from"@jackwener/opencli/download";import{downloadMedia as u}from"@jackwener/opencli/download/media-download";import{CliError as h,CommandExecutionError as m,EmptyResultError as f}from"@jackwener/opencli/errors";import{buildNoteUrl as p,parseNoteId as g}from"./note-helpers.js";export function buildDownloadExtractJs(t){return`
|
|
2
2
|
(() => {
|
|
3
3
|
const bodyText = document.body?.innerText || '';
|
|
4
4
|
const result = {
|
|
5
|
-
noteId: '${
|
|
5
|
+
noteId: '${t}',
|
|
6
6
|
pageUrl: location.href,
|
|
7
7
|
securityBlock: /安全限制|访问链接异常/.test(bodyText)
|
|
8
8
|
|| /website-login\\/error|error_code=300017|error_code=300031/.test(location.href),
|
|
@@ -55,7 +55,7 @@ import{cli as O,Strategy as P}from"@jackwener/opencli/registry";import{formatCoo
|
|
|
55
55
|
const state = window.__INITIAL_STATE__;
|
|
56
56
|
const noteData = state?.note?.noteDetailMap || state?.note?.note || {};
|
|
57
57
|
if (!noteData || typeof noteData !== 'object') return [];
|
|
58
|
-
const currentIds = [...new Set([result.noteId, '${
|
|
58
|
+
const currentIds = [...new Set([result.noteId, '${t}'].filter(Boolean))];
|
|
59
59
|
const notes = [];
|
|
60
60
|
for (const id of currentIds) {
|
|
61
61
|
const entry = noteData[id];
|
|
@@ -197,4 +197,4 @@ import{cli as O,Strategy as P}from"@jackwener/opencli/registry";import{formatCoo
|
|
|
197
197
|
|
|
198
198
|
return result;
|
|
199
199
|
})()
|
|
200
|
-
`}export const command=
|
|
200
|
+
`}export const command=c({site:"xiaohongshu",name:"download",access:"read",description:"下载小红书笔记中的图片和视频",domain:"www.xiaohongshu.com",strategy:l.COOKIE,navigateBefore:!1,args:[{name:"note-id",positional:!0,required:!0,help:"Full Xiaohongshu note URL with xsec_token, or xhslink short link"},{name:"output",default:"./xiaohongshu-downloads",help:"Output directory"}],columns:["index","type","status","size"],func:async(t,r)=>{const o=String(r["note-id"]),i=r.output,s=g(o);await t.goto(p(o,{allowShortLink:!0,commandName:"xiaohongshu download"}));await t.wait({time:1+Math.random()*2});const e=await t.evaluate(buildDownloadExtractJs(s));if(e?.securityBlock)throw new h("SECURITY_BLOCK","Xiaohongshu security block: the note detail page was blocked by risk control.",/^https?:\/\//.test(o)?"The page may be temporarily restricted. Try again later or from a different session.":"Try using a full URL from search results (with xsec_token) instead of a bare note ID.");if(!e||typeof e!=="object"||!Array.isArray(e.media))throw new m("Xiaohongshu media extraction returned malformed payload.");if(e.media.length===0)throw new f("xiaohongshu download","No downloadable media found on this note.");const n=d(await t.getCookies({domain:"xiaohongshu.com"})),a=typeof e.noteId==="string"&&e.noteId.trim()?e.noteId.trim():s;return u(e.media,{output:i,subdir:a,cookies:n,filenamePrefix:a,timeout:60000})}});
|
package/clis/xiaohongshu/feed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as f,Strategy as m}from"@jackwener/opencli/registry";import{ArgumentError as l,CommandExecutionError as a,EmptyResultError as p}from"@jackwener/opencli/errors";function h(e){const r=Number(e??20);if(!Number.isFinite(r)||!Number.isInteger(r))throw new l(`--limit must be a positive integer, got ${JSON.stringify(e)}`);if(r<1)throw new l(`--limit must be a positive integer, got ${r}`);return r}const y=`
|
|
2
2
|
(() => {
|
|
3
3
|
let pinia = null;
|
|
4
4
|
const probe = (el) => el?.__vue_app__?.config?.globalProperties?.$pinia ?? null;
|
|
@@ -35,4 +35,4 @@ import{cli as Y,Strategy as Z}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
35
35
|
}),
|
|
36
36
|
};
|
|
37
37
|
})()
|
|
38
|
-
`;function
|
|
38
|
+
`;function o(e){return typeof e==="string"?e.trim():e==null?"":String(e).trim()}function g(e){if(e&&!Array.isArray(e)&&typeof e==="object"&&"session"in e&&"data"in e)return e.data;return e}export function buildFeedNoteUrl(e,r,t){const d=o(r),n=new URL(`https://${e}/explore/${encodeURIComponent(d)}`),s=o(t);if(!s)return n.toString();n.searchParams.set("xsec_token",s);n.searchParams.set("xsec_source","");return n.toString()}export async function runFeed(e,r,t){const d=h(r.limit);await e.goto(`https://${t}/explore`);await e.wait({time:2});const n=g(await e.evaluate(y));if(!n||typeof n!=="object")throw new a(`${t} feed: unexpected evaluate response`);if(n.error)throw new a(`${t} feed: ${n.error}`,`The SPA may still be hydrating; reload ${t}/explore and retry.`);if(!Array.isArray(n.items))throw new a(`${t} feed: unexpected items payload shape`);const s=[];for(const i of n.items){if(s.length>=d)break;if(!i||typeof i!=="object")throw new a(`${t} feed: malformed feed item`);const c=o(i.id);if(!c)throw new a(`${t} feed: feed item is missing note id`);const u=o(i.xsecToken);if(!u)throw new a(`${t} feed: feed item ${c} is missing xsecToken; cannot build a signed drill-down URL`);s.push({id:c,title:o(i.title),type:o(i.type),author:o(i.author),likes:o(i.likes),url:buildFeedNoteUrl(t,c,u)})}if(s.length===0)throw new p(`${t}/feed`,"No feed items in the hydrated store.");return s}export const command=f({site:"xiaohongshu",name:"feed",access:"read",description:"小红书首页推荐 Feed (reads hydrated Pinia store)",domain:"www.xiaohongshu.com",strategy:m.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"limit",type:"int",default:20,help:"Number of items to return"}],columns:["id","title","author","likes","type","url"],func:async(e,r)=>runFeed(e,r,"www.xiaohongshu.com")});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as w,Strategy as d}from"@jackwener/opencli/registry";import{ArgumentError as l,AuthRequiredError as p,CliError as m,CommandExecutionError as r}from"@jackwener/opencli/errors";import{normalizeXhsUserId as g}from"./user-helpers.js";const L=2500,b=5000,S=/^[a-zA-Z0-9]{8,32}$/;function u(o){const e=String(o||"").toLowerCase();return e==="xiaohongshu.com"||e.endsWith(".xiaohongshu.com")}function f(o){if(o&&typeof o==="object"&&"session"in o&&"data"in o)return o.data;return o}function E(o,e){const t=f(o);if(!t||typeof t!=="object"||Array.isArray(t)||typeof t.ok!=="boolean")throw new r(`xiaohongshu/follow: malformed ${e} payload`);return t}function c(o){const e=String(o??"").trim();if(/^https?:\/\//i.test(e)){let n;try{n=new URL(e)}catch{throw new l("xiaohongshu/follow: invalid profile URL")}if(n.protocol!=="https:"||!u(n.hostname))throw new l("xiaohongshu/follow: profile URL must be an exact https://*.xiaohongshu.com URL");const i=n.pathname.match(/^\/user\/profile\/([a-zA-Z0-9]{8,32})\/?$/);if(!i)throw new l("xiaohongshu/follow: profile URL must be /user/profile/<userId>");return i[1]}const t=g(o);if(!t||!S.test(t))throw new l("xiaohongshu/follow: user-id must be a Xiaohongshu user ID (e.g. 5d8f88dc0000000001005d3a) or full profile URL");return t}function h(){return`
|
|
2
2
|
(async () => {
|
|
3
3
|
const FOLLOW_LABELS = ['关注', '+ 关注', '+关注'];
|
|
4
4
|
const FOLLOWING_LABELS = ['已关注', '已互关', '互相关注'];
|
|
5
|
-
const STATE_FLIP_TIMEOUT_MS = ${
|
|
5
|
+
const STATE_FLIP_TIMEOUT_MS = ${b};
|
|
6
6
|
const STATE_POLL_MS = 250;
|
|
7
7
|
|
|
8
8
|
const isVisible = (el) => !!el && el.offsetParent !== null;
|
|
@@ -72,4 +72,4 @@ import{cli as q,Strategy as O}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
72
72
|
reason: 'Follow button click did not flip to 已关注 within ' + (STATE_FLIP_TIMEOUT_MS / 1000) + 's',
|
|
73
73
|
};
|
|
74
74
|
})()
|
|
75
|
-
`}
|
|
75
|
+
`}w({site:"xiaohongshu",name:"follow",access:"write",description:"关注小红书用户 (profile UI automation)",domain:"www.xiaohongshu.com",strategy:d.COOKIE,navigateBefore:!1,browser:!0,args:[{name:"user-id",required:!0,positional:!0,help:"User ID (e.g. 5d8f88dc0000000001005d3a) or profile URL"}],columns:["status","user_id","url"],func:async(o,e)=>{if(!o)throw new r("Browser session required for xiaohongshu follow");try{const t=c(e["user-id"]),n=`https://www.xiaohongshu.com/user/profile/${t}`;await o.goto(n);await o.wait({time:L/1000});const i=f(await o.evaluate("() => location.href"));if(typeof i!=="string")throw new r("xiaohongshu/follow: malformed current-url payload");const s=new URL(i);if(s.protocol!=="https:"||!u(s.hostname))throw new r(`xiaohongshu/follow: expected Xiaohongshu profile host, got ${s.hostname}`);if(/\/login(?:[/?#]|$)/i.test(s.pathname))throw new p("www.xiaohongshu.com");if(s.pathname.match(/^\/user\/profile\/([a-zA-Z0-9]{8,32})\/?$/)?.[1]!==t)throw new r(`xiaohongshu/follow: expected profile ${t}, got ${s.pathname}`);const a=E(await o.evaluate(h()),"follow-action");if(!a.ok)throw new r(`xiaohongshu/follow failed: ${a.reason??"unknown reason"}`);return[{status:a.state,user_id:t,url:n}]}catch(t){if(t instanceof m)throw t;throw new r(`xiaohongshu/follow failed: ${t?.message??String(t)}`)}}});export const __test__={assertUserId:c,buildFollowScript:h};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function e(t,o){return t+Math.random()*(o-t)}function M(t,o=0.4,r=0.02){const n=t*o;return Math.max(r,t-n+Math.random()*n*2)}export async function humanWait(t,o,r=0.4){try{await t.wait({time:M(o,r)})}catch{}}export async function humanType(t,o){const r=String(o);if(!r)return;if(typeof t.insertText!=="function"){try{await t.insertText?.(r)}catch{}return}let n=0;while(n<r.length){const a=Math.max(1,Math.round(e(1,4))),i=r.slice(n,n+a);n+=i.length;try{await t.insertText(i)}catch{try{await t.insertText(r.slice(n-i.length))}catch{}return}const h=Math.random()<0.12?e(0.35,0.8):e(0.04,0.18);try{await t.wait({time:h})}catch{}}}function m(t){if(!t.__xhsCursor)t.__xhsCursor={x:Math.round(e(80,520)),y:Math.round(e(120,420))};return t.__xhsCursor}function _(t,o,r){const n=o.x-t.x,a=o.y-t.y,i=Math.hypot(n,a)||1,h=-a/i,y=n/i,u=e(0.05,0.22)*i*(Math.random()<0.5?1:-1),l={x:t.x+n*e(0.2,0.4)+h*u,y:t.y+a*e(0.2,0.4)+y*u},d={x:t.x+n*e(0.6,0.8)+h*u*e(0.3,0.7),y:t.y+a*e(0.6,0.8)+y*u*e(0.3,0.7)},f=[];for(let x=1;x<=r;x++){const c=x/r,s=1-c,w=s*s*s*t.x+3*s*s*c*l.x+3*s*c*c*d.x+c*c*c*o.x,p=s*s*s*t.y+3*s*s*c*l.y+3*s*c*c*d.y+c*c*c*o.y;f.push({x:Math.round(w),y:Math.round(p)})}return f}export async function humanMoveTo(t,o,r){if(typeof t.cdp!=="function")return;const n={x:Math.round(o+e(-3,3)),y:Math.round(r+e(-3,3))},a=m(t),i=Math.hypot(n.x-a.x,n.y-a.y),h=Math.max(6,Math.min(18,Math.round(i/30))),y=_(a,n,h);for(const u of y){try{await t.cdp("Input.dispatchMouseEvent",{type:"mouseMoved",x:u.x,y:u.y})}catch{return}try{await t.wait({time:M(0.02,0.6,0.008)})}catch{}}t.__xhsCursor=n}export async function elementViewportCenter(t,o){try{const r=await t.evaluate(`
|
|
2
2
|
(sels => {
|
|
3
3
|
const __opencli_xhs_el_center = true;
|
|
4
4
|
for (const sel of sels) {
|
|
@@ -10,5 +10,5 @@ function E(q,D){return q+Math.random()*(D-q)}function V(q,D=0.4,B=0.02){const A=
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
return null;
|
|
13
|
-
})(${JSON.stringify(
|
|
14
|
-
`),
|
|
13
|
+
})(${JSON.stringify(o)})
|
|
14
|
+
`),n=r&&typeof r==="object"&&"data"in r?r.data:r;if(n&&typeof n.x==="number"&&typeof n.y==="number")return n}catch{}return null}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as a}from"@jackwener/opencli/errors";export function parseNoteId(t){const o=t.trim(),e=o.match(/\/(?:explore|note|search_result|discovery\/item)\/([a-f0-9]+)|\/user\/profile\/[^/?#]+\/([a-f0-9]+)/i);return e?e[1]||e[2]:o}export const XHS_SIGNED_URL_HINT="Pass a full Xiaohongshu note URL with xsec_token from search results or user/profile context.";function m(t){return/^https?:\/\/xhslink\.com\//i.test(t)}function f(t,o){const e=t.toLowerCase();return e===o||e.endsWith("."+o)}function p(t){return/^\/(?:explore|note|search_result|discovery\/item)\/[a-f0-9]+(?:[/?#]|$)/i.test(t)||/^\/user\/profile\/[^/?#]+\/[a-f0-9]+(?:[/?#]|$)/i.test(t)}export function buildNoteUrl(t,o={}){const{allowShortLink:e=!1,commandName:h="xiaohongshu note",cookieRoot:u="xiaohongshu.com",signedUrlHint:c=XHS_SIGNED_URL_HINT}=o,r=t.trim(),s=`${h} now requires a full signed URL`,n=e?`${c} For downloads, xhslink short links are also supported.`:c;if(/^https?:\/\//.test(r)){if(m(r)){if(e)return r;throw new a(s,n)}try{const i=new URL(r),l=i.searchParams.get("xsec_token")?.trim();if(f(i.hostname,u)&&p(i.pathname)&&l)return r}catch{}throw new a(s,n)}throw new a(s,n)}
|
package/clis/xiaohongshu/note.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as d,Strategy as h}from"@jackwener/opencli/registry";import{AuthRequiredError as m,CliError as p,EmptyResultError as a}from"@jackwener/opencli/errors";import{parseNoteId as g,buildNoteUrl as f}from"./note-helpers.js";export const NOTE_EXTRACT_JS=`
|
|
2
2
|
(() => {
|
|
3
3
|
const bodyText = document.body?.innerText || ''
|
|
4
4
|
const loginWall = /登录后查看|请登录/.test(bodyText)
|
|
@@ -29,4 +29,4 @@ import{cli as Q,Strategy as V}from"@jackwener/opencli/registry";import{AuthRequi
|
|
|
29
29
|
|
|
30
30
|
return { pageUrl: location.href, securityBlock, loginWall, notFound, title, desc, author, likes, collects, comments, tags }
|
|
31
31
|
})()
|
|
32
|
-
`,command=
|
|
32
|
+
`,command=d({site:"xiaohongshu",name:"note",access:"read",description:"获取小红书笔记正文和互动数据",domain:"www.xiaohongshu.com",strategy:h.COOKIE,navigateBefore:!1,args:[{name:"note-id",required:!0,positional:!0,help:"Full Xiaohongshu note URL with xsec_token"}],columns:["field","value"],func:async(o,i)=>{const n=String(i["note-id"]),l=g(n),u=f(n,{commandName:"xiaohongshu note"});await o.goto(u);await o.wait({time:2+Math.random()*3});const t=await o.evaluate(NOTE_EXTRACT_JS);if(!t||typeof t!=="object")throw new a("xiaohongshu/note","Unexpected evaluate response");if(t.securityBlock)throw new p("SECURITY_BLOCK","Xiaohongshu security block: the note detail page was blocked by risk control.",/^https?:\/\//.test(n)?"The page may be temporarily restricted. Try again later or from a different session.":"Try using a full URL from search results (with xsec_token) instead of a bare note ID.");if(t.loginWall)throw new m("www.xiaohongshu.com","Note content requires login");if(t.notFound)throw new a("xiaohongshu/note",`Note ${l} not found or unavailable — it may have been deleted or restricted`);const e=t,r=(s)=>/^\d+/.test(s)?s:"0";if(!e.title&&!e.author)throw new a("xiaohongshu/note","The note page loaded without visible content. The note may be deleted or restricted.");const c=[{field:"title",value:e.title||""},{field:"author",value:e.author||""},{field:"content",value:e.desc||""},{field:"likes",value:r(e.likes||"")},{field:"collects",value:r(e.collects||"")},{field:"comments",value:r(e.comments||"")}];if(e.tags?.length)c.push({field:"tags",value:e.tags.join(", ")});return c}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as i,Strategy as e}from"@jackwener/opencli/registry";export function buildNotificationsPipeline(t){return[{navigate:`https://${t}/notification`},{tap:{store:"notification",action:"getNotification",args:["${{ args.type | default('mentions') }}"],capture:"/you/",select:"data.message_list",timeout:8}},{map:{rank:"${{ index + 1 }}",user:"${{ item.user_info.nickname }}",action:"${{ item.title }}",content:"${{ item.comment_info.content }}",note:"${{ item.item_info.content }}",time:"${{ item.time }}"}},{limit:"${{ args.limit | default(20) }}"}]}export const command=i({site:"xiaohongshu",name:"notifications",access:"read",description:"小红书通知 (mentions/likes/connections)",domain:"www.xiaohongshu.com",strategy:e.INTERCEPT,browser:!0,args:[{name:"type",default:"mentions",help:"Notification type: mentions, likes, or connections"},{name:"limit",type:"int",default:20,help:"Number of notifications to return"}],columns:["rank","user","action","content","note","time"],pipeline:buildNotificationsPipeline("www.xiaohongshu.com")});
|