publishport-opencli 1.0.0
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/LICENSE +214 -0
- package/README.md +299 -0
- package/README.zh-CN.md +341 -0
- package/cli-manifest.json +51513 -0
- package/clis/12306/auth.js +25 -0
- package/clis/12306/me.js +9 -0
- package/clis/12306/orders.js +13 -0
- package/clis/12306/passengers.js +14 -0
- package/clis/12306/price.js +1 -0
- package/clis/12306/stations.js +1 -0
- package/clis/12306/train.js +1 -0
- package/clis/12306/trains.js +1 -0
- package/clis/12306/utils.js +1 -0
- package/clis/1688/assets.js +127 -0
- package/clis/1688/auth.js +1 -0
- package/clis/1688/download.js +1 -0
- package/clis/1688/item.js +21 -0
- package/clis/1688/search.js +129 -0
- package/clis/1688/shared.js +11 -0
- package/clis/1688/store.js +26 -0
- package/clis/1point3acres/auth.js +18 -0
- package/clis/1point3acres/digest.js +1 -0
- package/clis/1point3acres/forum.js +1 -0
- package/clis/1point3acres/forums.js +1 -0
- package/clis/1point3acres/hot.js +1 -0
- package/clis/1point3acres/latest.js +1 -0
- package/clis/1point3acres/notifications.js +1 -0
- package/clis/1point3acres/search.js +1 -0
- package/clis/1point3acres/thread.js +2 -0
- package/clis/1point3acres/user.js +1 -0
- package/clis/1point3acres/utils.js +6 -0
- package/clis/36kr/article.js +20 -0
- package/clis/36kr/hot.js +16 -0
- package/clis/36kr/news.js +1 -0
- package/clis/36kr/search.js +36 -0
- package/clis/51job/company.js +36 -0
- package/clis/51job/detail.js +35 -0
- package/clis/51job/hot.js +1 -0
- package/clis/51job/search.js +1 -0
- package/clis/51job/utils.js +21 -0
- package/clis/_atlassian/shared.js +21 -0
- package/clis/_shared/article/auth.js +16 -0
- package/clis/_shared/article/douban-md2draft.js +4 -0
- package/clis/_shared/article/format.js +1 -0
- package/clis/_shared/article/images.js +95 -0
- package/clis/_shared/article/login.js +1 -0
- package/clis/_shared/article/page-runtime.js +745 -0
- package/clis/_shared/article/publish.js +34 -0
- package/clis/_shared/common.js +1 -0
- package/clis/_shared/content-guard.js +1 -0
- package/clis/_shared/desktop-commands.js +1 -0
- package/clis/_shared/search-adapter.js +1 -0
- package/clis/_shared/site-auth.js +1 -0
- package/clis/_shared/token-auth.js +2 -0
- package/clis/_shared/video-publish.js +62 -0
- package/clis/aibase/news.js +31 -0
- package/clis/amazon/auth.js +19 -0
- package/clis/amazon/bestsellers.js +1 -0
- package/clis/amazon/discussion.js +20 -0
- package/clis/amazon/movers-shakers.js +1 -0
- package/clis/amazon/new-releases.js +1 -0
- package/clis/amazon/offer.js +29 -0
- package/clis/amazon/product.js +25 -0
- package/clis/amazon/rankings.js +68 -0
- package/clis/amazon/search.js +16 -0
- package/clis/amazon/shared.js +11 -0
- package/clis/antigravity/SKILL.md +38 -0
- package/clis/antigravity/_actions.js +201 -0
- package/clis/antigravity/audit-extras.js +78 -0
- package/clis/antigravity/delete.js +1 -0
- package/clis/antigravity/dump.js +1 -0
- package/clis/antigravity/extract-code.js +18 -0
- package/clis/antigravity/history.js +1 -0
- package/clis/antigravity/mark-read.js +1 -0
- package/clis/antigravity/model.js +90 -0
- package/clis/antigravity/new.js +9 -0
- package/clis/antigravity/read.js +10 -0
- package/clis/antigravity/rename.js +1 -0
- package/clis/antigravity/send.js +11 -0
- package/clis/antigravity/serve.js +97 -0
- package/clis/antigravity/status.js +1 -0
- package/clis/antigravity/storage.js +12 -0
- package/clis/antigravity/watch.js +6 -0
- package/clis/apple-podcasts/episodes.js +1 -0
- package/clis/apple-podcasts/search.js +1 -0
- package/clis/apple-podcasts/top.js +1 -0
- package/clis/apple-podcasts/utils.js +1 -0
- package/clis/archive/item.js +1 -0
- package/clis/archive/search.js +1 -0
- package/clis/archive/snapshots.js +1 -0
- package/clis/archive/wayback.js +1 -0
- package/clis/arxiv/author.js +1 -0
- package/clis/arxiv/paper.js +1 -0
- package/clis/arxiv/recent.js +1 -0
- package/clis/arxiv/search.js +1 -0
- package/clis/arxiv/utils.js +1 -0
- package/clis/autohome/__fixtures__/catalog.html +11 -0
- package/clis/autohome/__fixtures__/koubei.json +116 -0
- package/clis/autohome/brand.js +1 -0
- package/clis/autohome/score.js +1 -0
- package/clis/autohome/utils.js +1 -0
- package/clis/baidu-scholar/search.js +63 -0
- package/clis/baijiahao/article.js +1 -0
- package/clis/baijiahao/lists.js +1 -0
- package/clis/baijiahao/login.js +1 -0
- package/clis/baijiahao/publish.js +57 -0
- package/clis/baijiahao/stats.js +1 -0
- package/clis/baijiahao/whoami.js +1 -0
- package/clis/band/auth.js +29 -0
- package/clis/band/bands.js +37 -0
- package/clis/band/mentions.js +6 -0
- package/clis/band/post.js +76 -0
- package/clis/band/posts.js +50 -0
- package/clis/barchart/flow.js +70 -0
- package/clis/barchart/greeks.js +88 -0
- package/clis/barchart/options.js +61 -0
- package/clis/barchart/quote.js +87 -0
- package/clis/bbc/news.js +1 -0
- package/clis/bbc/topic.js +1 -0
- package/clis/bbc/utils.js +1 -0
- package/clis/bilibili/article.js +1 -0
- package/clis/bilibili/auth.js +1 -0
- package/clis/bilibili/categories.js +1 -0
- package/clis/bilibili/coin.js +1 -0
- package/clis/bilibili/comment-del.js +1 -0
- package/clis/bilibili/comment-like.js +1 -0
- package/clis/bilibili/comment.js +1 -0
- package/clis/bilibili/comments.js +1 -0
- package/clis/bilibili/dm-list.js +1 -0
- package/clis/bilibili/dm-read.js +1 -0
- package/clis/bilibili/dm-send.js +1 -0
- package/clis/bilibili/download.js +7 -0
- package/clis/bilibili/drafts.js +1 -0
- package/clis/bilibili/dynamic-post.js +24 -0
- package/clis/bilibili/dynamic.js +1 -0
- package/clis/bilibili/favorite-add.js +1 -0
- package/clis/bilibili/favorite.js +1 -0
- package/clis/bilibili/feed.js +2 -0
- package/clis/bilibili/follow.js +1 -0
- package/clis/bilibili/following.js +1 -0
- package/clis/bilibili/history.js +1 -0
- package/clis/bilibili/hot.js +15 -0
- package/clis/bilibili/like.js +1 -0
- package/clis/bilibili/me.js +1 -0
- package/clis/bilibili/partitions.js +1 -0
- package/clis/bilibili/ranking.js +1 -0
- package/clis/bilibili/search.js +1 -0
- package/clis/bilibili/stats.js +1 -0
- package/clis/bilibili/subtitle.js +21 -0
- package/clis/bilibili/summary.js +1 -0
- package/clis/bilibili/topics.js +1 -0
- package/clis/bilibili/unfollow.js +1 -0
- package/clis/bilibili/upload.js +1 -0
- package/clis/bilibili/user-videos.js +1 -0
- package/clis/bilibili/utils.js +50 -0
- package/clis/bilibili/video-drafts.js +1 -0
- package/clis/bilibili/video.js +1 -0
- package/clis/binance/asks.js +1 -0
- package/clis/binance/depth.js +1 -0
- package/clis/binance/gainers.js +1 -0
- package/clis/binance/klines.js +1 -0
- package/clis/binance/losers.js +1 -0
- package/clis/binance/pairs.js +1 -0
- package/clis/binance/price.js +1 -0
- package/clis/binance/prices.js +1 -0
- package/clis/binance/ticker.js +1 -0
- package/clis/binance/top.js +1 -0
- package/clis/binance/trades.js +1 -0
- package/clis/bloomberg/businessweek.js +12 -0
- package/clis/bloomberg/crypto.js +1 -0
- package/clis/bloomberg/economics.js +1 -0
- package/clis/bloomberg/feeds.js +1 -0
- package/clis/bloomberg/green.js +1 -0
- package/clis/bloomberg/industries.js +1 -0
- package/clis/bloomberg/main.js +1 -0
- package/clis/bloomberg/markets.js +1 -0
- package/clis/bloomberg/news.js +57 -0
- package/clis/bloomberg/opinions.js +1 -0
- package/clis/bloomberg/politics.js +1 -0
- package/clis/bloomberg/pursuits.js +1 -0
- package/clis/bloomberg/tech.js +1 -0
- package/clis/bloomberg/utils.js +17 -0
- package/clis/bluesky/post.js +1 -0
- package/clis/bluesky/shared.js +56 -0
- package/clis/bluesky/whoami.js +1 -0
- package/clis/booking/search.js +93 -0
- package/clis/boss/auth.js +13 -0
- package/clis/boss/batchgreet.js +1 -0
- package/clis/boss/chatlist.js +1 -0
- package/clis/boss/chatmsg.js +1 -0
- package/clis/boss/detail.js +1 -0
- package/clis/boss/exchange.js +1 -0
- package/clis/boss/greet.js +1 -0
- package/clis/boss/invite.js +4 -0
- package/clis/boss/joblist.js +1 -0
- package/clis/boss/mark.js +1 -0
- package/clis/boss/recommend.js +1 -0
- package/clis/boss/resume.js +90 -0
- package/clis/boss/search.js +1 -0
- package/clis/boss/send.js +1 -0
- package/clis/boss/stats.js +1 -0
- package/clis/boss/utils.js +161 -0
- package/clis/brave/search.js +23 -0
- package/clis/chaoxing/assignments.js +1 -0
- package/clis/chaoxing/auth.js +21 -0
- package/clis/chaoxing/exams.js +1 -0
- package/clis/chaoxing/utils.js +58 -0
- package/clis/chatgpt/ask.js +1 -0
- package/clis/chatgpt/auth.js +17 -0
- package/clis/chatgpt/detail.js +1 -0
- package/clis/chatgpt/history.js +1 -0
- package/clis/chatgpt/image.js +1 -0
- package/clis/chatgpt/model.js +1 -0
- package/clis/chatgpt/new.js +1 -0
- package/clis/chatgpt/project-file-add.js +1 -0
- package/clis/chatgpt/project-list.js +1 -0
- package/clis/chatgpt/read.js +1 -0
- package/clis/chatgpt/send.js +1 -0
- package/clis/chatgpt/status.js +1 -0
- package/clis/chatgpt/utils.js +1092 -0
- package/clis/chatgpt-app/ask.js +1 -0
- package/clis/chatgpt-app/ax.js +512 -0
- package/clis/chatgpt-app/model.js +1 -0
- package/clis/chatgpt-app/new.js +1 -0
- package/clis/chatgpt-app/read.js +1 -0
- package/clis/chatgpt-app/send.js +1 -0
- package/clis/chatgpt-app/status.js +1 -0
- package/clis/chatwise/ask.js +1 -0
- package/clis/chatwise/export.js +21 -0
- package/clis/chatwise/history.js +26 -0
- package/clis/chatwise/model.js +48 -0
- package/clis/chatwise/new.js +1 -0
- package/clis/chatwise/read.js +25 -0
- package/clis/chatwise/screenshot.js +1 -0
- package/clis/chatwise/send.js +1 -0
- package/clis/chatwise/status.js +1 -0
- package/clis/chatwise/utils.js +75 -0
- package/clis/chess/analyze.js +1 -0
- package/clis/chess/game.js +1 -0
- package/clis/chess/games.js +1 -0
- package/clis/chess/stats.js +1 -0
- package/clis/chess/utils.js +1 -0
- package/clis/claude/ask.js +4 -0
- package/clis/claude/auth.js +19 -0
- package/clis/claude/detail.js +1 -0
- package/clis/claude/history.js +1 -0
- package/clis/claude/new.js +1 -0
- package/clis/claude/read.js +1 -0
- package/clis/claude/send.js +1 -0
- package/clis/claude/status.js +1 -0
- package/clis/claude/utils.js +179 -0
- package/clis/cnblogs/article.js +1 -0
- package/clis/cnblogs/login.js +1 -0
- package/clis/cnblogs/stats.js +37 -0
- package/clis/cnblogs/whoami.js +1 -0
- package/clis/cnki/search.js +38 -0
- package/clis/codex/_actions.js +72 -0
- package/clis/codex/archive.js +1 -0
- package/clis/codex/ask.js +23 -0
- package/clis/codex/dump.js +1 -0
- package/clis/codex/export.js +12 -0
- package/clis/codex/extract-diff.js +28 -0
- package/clis/codex/history.js +1 -0
- package/clis/codex/model.js +118 -0
- package/clis/codex/new.js +1 -0
- package/clis/codex/pin.js +1 -0
- package/clis/codex/projects.js +1 -0
- package/clis/codex/read.js +16 -0
- package/clis/codex/rename.js +34 -0
- package/clis/codex/screenshot.js +1 -0
- package/clis/codex/send.js +16 -0
- package/clis/codex/sidebar.js +1 -0
- package/clis/codex/status.js +1 -0
- package/clis/coingecko/categories.js +1 -0
- package/clis/coingecko/coin.js +1 -0
- package/clis/coingecko/derivatives.js +1 -0
- package/clis/coingecko/exchanges.js +1 -0
- package/clis/coingecko/global.js +1 -0
- package/clis/coingecko/top.js +1 -0
- package/clis/coingecko/trending.js +1 -0
- package/clis/confluence/create.js +1 -0
- package/clis/confluence/page.js +1 -0
- package/clis/confluence/search.js +1 -0
- package/clis/confluence/shared.js +1 -0
- package/clis/confluence/update.js +1 -0
- package/clis/coupang/add-to-cart.js +86 -0
- package/clis/coupang/auth.js +16 -0
- package/clis/coupang/product.js +161 -0
- package/clis/coupang/search.js +385 -0
- package/clis/coupang/utils.js +1 -0
- package/clis/crates/crate.js +1 -0
- package/clis/crates/search.js +1 -0
- package/clis/crates/utils.js +1 -0
- package/clis/csdn/article.js +29 -0
- package/clis/csdn/columns.js +1 -0
- package/clis/csdn/login.js +1 -0
- package/clis/csdn/stats.js +71 -0
- package/clis/csdn/whoami.js +1 -0
- package/clis/cto51/article.js +1 -0
- package/clis/cto51/whoami.js +1 -0
- package/clis/ctrip/auth.js +1 -0
- package/clis/ctrip/flight.js +17 -0
- package/clis/ctrip/hotel-search.js +24 -0
- package/clis/ctrip/hotel-suggest.js +1 -0
- package/clis/ctrip/search.js +1 -0
- package/clis/ctrip/utils.js +119 -0
- package/clis/cursor/ask.js +22 -0
- package/clis/cursor/composer.js +12 -0
- package/clis/cursor/dump.js +1 -0
- package/clis/cursor/export.js +23 -0
- package/clis/cursor/extract-code.js +18 -0
- package/clis/cursor/history.js +26 -0
- package/clis/cursor/model.js +18 -0
- package/clis/cursor/new.js +1 -0
- package/clis/cursor/read.js +27 -0
- package/clis/cursor/screenshot.js +1 -0
- package/clis/cursor/send.js +12 -0
- package/clis/cursor/status.js +1 -0
- package/clis/dblp/author.js +1 -0
- package/clis/dblp/paper.js +1 -0
- package/clis/dblp/search.js +1 -0
- package/clis/dblp/utils.js +1 -0
- package/clis/dblp/venue.js +1 -0
- package/clis/deepseek/ask.js +1 -0
- package/clis/deepseek/auth.js +22 -0
- package/clis/deepseek/detail.js +1 -0
- package/clis/deepseek/history.js +1 -0
- package/clis/deepseek/new.js +1 -0
- package/clis/deepseek/read.js +1 -0
- package/clis/deepseek/send.js +50 -0
- package/clis/deepseek/status.js +1 -0
- package/clis/deepseek/utils.js +202 -0
- package/clis/defillama/protocol.js +1 -0
- package/clis/defillama/protocols.js +1 -0
- package/clis/defillama/utils.js +1 -0
- package/clis/devto/auth.js +9 -0
- package/clis/devto/latest.js +1 -0
- package/clis/devto/publish.js +17 -0
- package/clis/devto/read.js +3 -0
- package/clis/devto/stats.js +27 -0
- package/clis/devto/tag.js +1 -0
- package/clis/devto/top.js +1 -0
- package/clis/devto/user.js +1 -0
- package/clis/dianping/__fixtures__/search.html +168 -0
- package/clis/dianping/__fixtures__/shop.html +6 -0
- package/clis/dianping/auth.js +10 -0
- package/clis/dianping/cityResolver.js +4 -0
- package/clis/dianping/search.js +1 -0
- package/clis/dianping/shop.js +1 -0
- package/clis/dianping/utils.js +1 -0
- package/clis/dictionary/examples.js +1 -0
- package/clis/dictionary/search.js +1 -0
- package/clis/dictionary/synonyms.js +1 -0
- package/clis/discord-app/channels.js +1 -0
- package/clis/discord-app/delete.js +66 -0
- package/clis/discord-app/goto.js +1 -0
- package/clis/discord-app/members.js +21 -0
- package/clis/discord-app/read.js +1 -0
- package/clis/discord-app/search.js +29 -0
- package/clis/discord-app/send.js +10 -0
- package/clis/discord-app/servers.js +1 -0
- package/clis/discord-app/status.js +1 -0
- package/clis/discord-app/thread-read.js +1 -0
- package/clis/discord-app/threads.js +1 -0
- package/clis/discord-app/utils.js +226 -0
- package/clis/discord-web/auth.js +10 -0
- package/clis/discord-web/send.js +13 -0
- package/clis/dockerhub/image.js +1 -0
- package/clis/dockerhub/search.js +1 -0
- package/clis/dockerhub/utils.js +1 -0
- package/clis/dongchedi/__fixtures__/search.json +60 -0
- package/clis/dongchedi/__fixtures__/series-detail.json +911 -0
- package/clis/dongchedi/__fixtures__/series-score.json +1396 -0
- package/clis/dongchedi/koubei.js +1 -0
- package/clis/dongchedi/models.js +1 -0
- package/clis/dongchedi/score.js +1 -0
- package/clis/dongchedi/search.js +1 -0
- package/clis/dongchedi/series.js +1 -0
- package/clis/dongchedi/specs.js +1 -0
- package/clis/dongchedi/utils.js +1 -0
- package/clis/douban/article.js +53 -0
- package/clis/douban/auth.js +21 -0
- package/clis/douban/book-hot.js +1 -0
- package/clis/douban/download.js +1 -0
- package/clis/douban/marks.js +59 -0
- package/clis/douban/movie-hot.js +1 -0
- package/clis/douban/photos.js +1 -0
- package/clis/douban/reviews.js +53 -0
- package/clis/douban/search.js +1 -0
- package/clis/douban/subject.js +1 -0
- package/clis/douban/top250.js +50 -0
- package/clis/douban/utils.js +344 -0
- package/clis/doubao/ask.js +1 -0
- package/clis/doubao/auth.js +28 -0
- package/clis/doubao/detail.js +1 -0
- package/clis/doubao/history.js +1 -0
- package/clis/doubao/meeting-summary.js +1 -0
- package/clis/doubao/meeting-transcript.js +1 -0
- package/clis/doubao/new.js +1 -0
- package/clis/doubao/read.js +1 -0
- package/clis/doubao/send.js +1 -0
- package/clis/doubao/status.js +1 -0
- package/clis/doubao/utils.js +704 -0
- package/clis/doubao-app/ask.js +1 -0
- package/clis/doubao-app/dump.js +1 -0
- package/clis/doubao-app/new.js +1 -0
- package/clis/doubao-app/read.js +1 -0
- package/clis/doubao-app/screenshot.js +1 -0
- package/clis/doubao-app/send.js +1 -0
- package/clis/doubao-app/status.js +1 -0
- package/clis/doubao-app/utils.js +64 -0
- package/clis/douyin/_shared/browser-fetch.js +28 -0
- package/clis/douyin/_shared/creation-id.js +1 -0
- package/clis/douyin/_shared/evaluate-result.js +1 -0
- package/clis/douyin/_shared/imagex-upload.js +1 -0
- package/clis/douyin/_shared/public-api.js +1 -0
- package/clis/douyin/_shared/sts2.js +1 -0
- package/clis/douyin/_shared/text-extra.js +1 -0
- package/clis/douyin/_shared/timing.js +1 -0
- package/clis/douyin/_shared/tos-upload.js +5 -0
- package/clis/douyin/_shared/transcode.js +1 -0
- package/clis/douyin/_shared/types.js +1 -0
- package/clis/douyin/_shared/vod-upload.js +5 -0
- package/clis/douyin/activities.js +1 -0
- package/clis/douyin/auth.js +1 -0
- package/clis/douyin/collections.js +1 -0
- package/clis/douyin/delete.js +76 -0
- package/clis/douyin/draft.js +166 -0
- package/clis/douyin/drafts.js +1 -0
- package/clis/douyin/hashtag.js +1 -0
- package/clis/douyin/location.js +1 -0
- package/clis/douyin/profile.js +1 -0
- package/clis/douyin/publish-image.js +64 -0
- package/clis/douyin/publish.js +14 -0
- package/clis/douyin/search.js +51 -0
- package/clis/douyin/stats.js +1 -0
- package/clis/douyin/update.js +1 -0
- package/clis/douyin/user-videos.js +1 -0
- package/clis/douyin/videos.js +1 -0
- package/clis/duckduckgo/search.js +1 -0
- package/clis/duckduckgo/suggest.js +1 -0
- package/clis/eastmoney/_secid.js +1 -0
- package/clis/eastmoney/announcement.js +1 -0
- package/clis/eastmoney/article.js +1 -0
- package/clis/eastmoney/convertible.js +1 -0
- package/clis/eastmoney/etf.js +1 -0
- package/clis/eastmoney/holders.js +1 -0
- package/clis/eastmoney/hot-rank.js +30 -0
- package/clis/eastmoney/index-board.js +1 -0
- package/clis/eastmoney/kline.js +1 -0
- package/clis/eastmoney/kuaixun.js +1 -0
- package/clis/eastmoney/longhu.js +1 -0
- package/clis/eastmoney/money-flow.js +1 -0
- package/clis/eastmoney/northbound.js +1 -0
- package/clis/eastmoney/quote.js +1 -0
- package/clis/eastmoney/rank.js +1 -0
- package/clis/eastmoney/sectors.js +1 -0
- package/clis/eastmoney/whoami.js +1 -0
- package/clis/endoflife/product.js +1 -0
- package/clis/endoflife/utils.js +1 -0
- package/clis/facebook/__fixtures__/notifications-page.html +13 -0
- package/clis/facebook/add-friend.js +24 -0
- package/clis/facebook/auth.js +1 -0
- package/clis/facebook/comment.js +18 -0
- package/clis/facebook/events.js +26 -0
- package/clis/facebook/feed.js +209 -0
- package/clis/facebook/friends.js +24 -0
- package/clis/facebook/groups.js +32 -0
- package/clis/facebook/join-group.js +25 -0
- package/clis/facebook/like.js +29 -0
- package/clis/facebook/marketplace-inbox.js +34 -0
- package/clis/facebook/marketplace-listings.js +33 -0
- package/clis/facebook/memories.js +21 -0
- package/clis/facebook/notifications.js +31 -0
- package/clis/facebook/post.js +88 -0
- package/clis/facebook/profile.js +18 -0
- package/clis/facebook/search.js +22 -0
- package/clis/flathub/app.js +1 -0
- package/clis/flathub/search.js +1 -0
- package/clis/flathub/utils.js +1 -0
- package/clis/flomo/auth.js +22 -0
- package/clis/flomo/memos.js +13 -0
- package/clis/gemini/ask.js +1 -0
- package/clis/gemini/auth.js +14 -0
- package/clis/gemini/deep-research-result.js +4 -0
- package/clis/gemini/deep-research.js +1 -0
- package/clis/gemini/detail.js +1 -0
- package/clis/gemini/history.js +1 -0
- package/clis/gemini/image.js +3 -0
- package/clis/gemini/new.js +1 -0
- package/clis/gemini/read.js +1 -0
- package/clis/gemini/status.js +1 -0
- package/clis/gemini/utils.js +1234 -0
- package/clis/geogebra/add-circle.js +1 -0
- package/clis/geogebra/add-line.js +1 -0
- package/clis/geogebra/add-point.js +1 -0
- package/clis/geogebra/add-polygon.js +1 -0
- package/clis/geogebra/eval.js +1 -0
- package/clis/geogebra/hexagon.js +1 -0
- package/clis/geogebra/info.js +13 -0
- package/clis/geogebra/list.js +1 -0
- package/clis/geogebra/triangle.js +1 -0
- package/clis/geogebra/utils.js +99 -0
- package/clis/ghost/publish.js +1 -0
- package/clis/ghost/shared.js +1 -0
- package/clis/ghost/whoami.js +1 -0
- package/clis/gitee/auth.js +12 -0
- package/clis/gitee/index.js +1 -0
- package/clis/gitee/search.js +1 -0
- package/clis/gitee/trending.js +240 -0
- package/clis/gitee/user.js +71 -0
- package/clis/github/auth.js +7 -0
- package/clis/github-trending/repos.js +1 -0
- package/clis/google/news.js +1 -0
- package/clis/google/search.js +90 -0
- package/clis/google/suggest.js +1 -0
- package/clis/google/trends.js +1 -0
- package/clis/google/utils.js +1 -0
- package/clis/google-scholar/cite.js +20 -0
- package/clis/google-scholar/profile.js +36 -0
- package/clis/google-scholar/search.js +35 -0
- package/clis/goproxy/module.js +1 -0
- package/clis/goproxy/utils.js +1 -0
- package/clis/goproxy/versions.js +1 -0
- package/clis/gov-law/recent.js +1 -0
- package/clis/gov-law/search.js +14 -0
- package/clis/gov-law/shared.js +29 -0
- package/clis/gov-policy/__fixtures__/recent.html +16 -0
- package/clis/gov-policy/__fixtures__/search.html +41 -0
- package/clis/gov-policy/recent.js +8 -0
- package/clis/gov-policy/search.js +8 -0
- package/clis/gov-policy/utils.js +1 -0
- package/clis/grok/ask.js +1 -0
- package/clis/grok/auth.js +17 -0
- package/clis/grok/delete.js +1 -0
- package/clis/grok/detail.js +1 -0
- package/clis/grok/export-all.js +170 -0
- package/clis/grok/export-utils.js +1 -0
- package/clis/grok/export.js +106 -0
- package/clis/grok/history.js +1 -0
- package/clis/grok/image.js +119 -0
- package/clis/grok/image.test.ts +127 -0
- package/clis/grok/new.js +1 -0
- package/clis/grok/pin.js +1 -0
- package/clis/grok/read.js +1 -0
- package/clis/grok/send.js +1 -0
- package/clis/grok/status.js +1 -0
- package/clis/grok/utils.js +337 -0
- package/clis/guazi/__fixtures__/detail.html +7 -0
- package/clis/guazi/__fixtures__/list.html +5 -0
- package/clis/guazi/browse.js +1 -0
- package/clis/guazi/car.js +1 -0
- package/clis/guazi/utils.js +1 -0
- package/clis/hackernews/ask.js +1 -0
- package/clis/hackernews/auth.js +9 -0
- package/clis/hackernews/best.js +1 -0
- package/clis/hackernews/comment.js +61 -0
- package/clis/hackernews/jobs.js +1 -0
- package/clis/hackernews/new.js +1 -0
- package/clis/hackernews/read.js +11 -0
- package/clis/hackernews/search.js +1 -0
- package/clis/hackernews/show.js +1 -0
- package/clis/hackernews/submit.js +65 -0
- package/clis/hackernews/top.js +1 -0
- package/clis/hackernews/user.js +1 -0
- package/clis/hashnode/auth.js +11 -0
- package/clis/hashnode/publish.js +92 -0
- package/clis/hf/auth.js +12 -0
- package/clis/hf/datasets.js +1 -0
- package/clis/hf/models.js +1 -0
- package/clis/hf/paper.js +1 -0
- package/clis/hf/spaces.js +1 -0
- package/clis/hf/top.js +1 -0
- package/clis/homebrew/cask.js +1 -0
- package/clis/homebrew/formula.js +1 -0
- package/clis/homebrew/popular.js +1 -0
- package/clis/homebrew/utils.js +1 -0
- package/clis/huodongxing/events.js +1 -0
- package/clis/hupu/__fixtures__/hot-home.html +64 -0
- package/clis/hupu/auth.js +14 -0
- package/clis/hupu/detail.js +7 -0
- package/clis/hupu/hot.js +14 -0
- package/clis/hupu/like.js +1 -0
- package/clis/hupu/mentions.js +91 -0
- package/clis/hupu/reply.js +1 -0
- package/clis/hupu/search.js +1 -0
- package/clis/hupu/unlike.js +1 -0
- package/clis/hupu/utils.js +243 -0
- package/clis/imdb/person.js +140 -0
- package/clis/imdb/reviews.js +40 -0
- package/clis/imdb/search.js +113 -0
- package/clis/imdb/title.js +1 -0
- package/clis/imdb/top.js +1 -0
- package/clis/imdb/trending.js +1 -0
- package/clis/imdb/utils.js +162 -0
- package/clis/imooc/article.js +59 -0
- package/clis/imooc/login.js +1 -0
- package/clis/imooc/whoami.js +1 -0
- package/clis/indeed/job.js +20 -0
- package/clis/indeed/search.js +37 -0
- package/clis/indeed/utils.js +1 -0
- package/clis/infoq/article.js +19 -0
- package/clis/infoq/login.js +1 -0
- package/clis/infoq/whoami.js +1 -0
- package/clis/instagram/_shared/private-publish.js +75 -0
- package/clis/instagram/_shared/protocol-capture.js +180 -0
- package/clis/instagram/_shared/runtime-info.js +33 -0
- package/clis/instagram/auth.js +22 -0
- package/clis/instagram/collection-create.js +38 -0
- package/clis/instagram/collection-delete.js +72 -0
- package/clis/instagram/comment.js +26 -0
- package/clis/instagram/detail.js +2 -0
- package/clis/instagram/download.js +83 -0
- package/clis/instagram/explore.js +27 -0
- package/clis/instagram/follow.js +24 -0
- package/clis/instagram/followers.js +30 -0
- package/clis/instagram/following.js +74 -0
- package/clis/instagram/like.js +25 -0
- package/clis/instagram/note.js +162 -0
- package/clis/instagram/post.js +718 -0
- package/clis/instagram/profile.js +25 -0
- package/clis/instagram/reel.js +452 -0
- package/clis/instagram/save.js +25 -0
- package/clis/instagram/saved.js +37 -0
- package/clis/instagram/search.js +23 -0
- package/clis/instagram/story.js +21 -0
- package/clis/instagram/unfollow.js +21 -0
- package/clis/instagram/unlike.js +25 -0
- package/clis/instagram/unsave.js +25 -0
- package/clis/instagram/user.js +1 -0
- package/clis/jd/add-cart.js +22 -0
- package/clis/jd/auth.js +12 -0
- package/clis/jd/cart.js +59 -0
- package/clis/jd/detail.js +42 -0
- package/clis/jd/item.js +98 -0
- package/clis/jd/item.test.ts +517 -0
- package/clis/jd/reviews.js +31 -0
- package/clis/jd/search.js +42 -0
- package/clis/jianshu/article.js +1 -0
- package/clis/jianshu/login.js +1 -0
- package/clis/jianshu/notebooks.js +1 -0
- package/clis/jianshu/whoami.js +1 -0
- package/clis/jianyu/auth.js +28 -0
- package/clis/jianyu/detail.js +1 -0
- package/clis/jianyu/search.js +73 -0
- package/clis/jianyu/shared/china-bid-search.js +86 -0
- package/clis/jianyu/shared/procurement-contract.js +1 -0
- package/clis/jianyu/shared/procurement-detail.js +18 -0
- package/clis/jike/auth.js +19 -0
- package/clis/jike/comment.js +82 -0
- package/clis/jike/create.js +83 -0
- package/clis/jike/feed.js +32 -0
- package/clis/jike/like.js +38 -0
- package/clis/jike/notifications.js +115 -0
- package/clis/jike/post.js +33 -0
- package/clis/jike/repost.js +67 -0
- package/clis/jike/search.js +29 -0
- package/clis/jike/topic.js +20 -0
- package/clis/jike/user.js +19 -0
- package/clis/jike/utils.js +15 -0
- package/clis/jimeng/auth.js +13 -0
- package/clis/jimeng/generate.js +60 -0
- package/clis/jimeng/history.js +32 -0
- package/clis/jimeng/new.js +26 -0
- package/clis/jimeng/workspaces.js +22 -0
- package/clis/jira/attachments.js +1 -0
- package/clis/jira/comments.js +1 -0
- package/clis/jira/issue.js +1 -0
- package/clis/jira/links.js +1 -0
- package/clis/jira/search.js +1 -0
- package/clis/jira/shared.js +1 -0
- package/clis/juejin/article.js +5 -0
- package/clis/juejin/categories.js +1 -0
- package/clis/juejin/hot.js +1 -0
- package/clis/juejin/login.js +1 -0
- package/clis/juejin/recommend.js +1 -0
- package/clis/juejin/stats.js +53 -0
- package/clis/juejin/tags.js +1 -0
- package/clis/juejin/utils.js +1 -0
- package/clis/juejin/whoami.js +1 -0
- package/clis/ke/auth.js +14 -0
- package/clis/ke/chengjiao.js +45 -0
- package/clis/ke/ershoufang.js +50 -0
- package/clis/ke/utils.js +21 -0
- package/clis/ke/xiaoqu.js +45 -0
- package/clis/ke/zufang.js +50 -0
- package/clis/kimi/_utils.js +38 -0
- package/clis/kimi/audit-extras.js +64 -0
- package/clis/kimi/auth.js +17 -0
- package/clis/kimi/chat.js +77 -0
- package/clis/kimi/storage.js +14 -0
- package/clis/kimi/ui.js +89 -0
- package/clis/kimi/usage.js +51 -0
- package/clis/kuaishou/auth.js +1 -0
- package/clis/kuaishou/publish.js +53 -0
- package/clis/lesswrong/_helpers.js +9 -0
- package/clis/lesswrong/comments.js +9 -0
- package/clis/lesswrong/curated.js +5 -0
- package/clis/lesswrong/frontpage.js +5 -0
- package/clis/lesswrong/new.js +5 -0
- package/clis/lesswrong/read.js +5 -0
- package/clis/lesswrong/sequences.js +5 -0
- package/clis/lesswrong/shortform.js +5 -0
- package/clis/lesswrong/tag.js +5 -0
- package/clis/lesswrong/tags.js +5 -0
- package/clis/lesswrong/top-month.js +5 -0
- package/clis/lesswrong/top-week.js +5 -0
- package/clis/lesswrong/top-year.js +5 -0
- package/clis/lesswrong/top.js +5 -0
- package/clis/lesswrong/user-posts.js +5 -0
- package/clis/lesswrong/user.js +5 -0
- package/clis/lichess/top.js +1 -0
- package/clis/lichess/user.js +1 -0
- package/clis/lichess/utils.js +1 -0
- package/clis/linkedin/auth.js +27 -0
- package/clis/linkedin/comment.js +1 -0
- package/clis/linkedin/connect.js +244 -0
- package/clis/linkedin/create.js +113 -0
- package/clis/linkedin/follow.js +1 -0
- package/clis/linkedin/inbox.js +1 -0
- package/clis/linkedin/job-detail.js +40 -0
- package/clis/linkedin/jobs-preferences.js +34 -0
- package/clis/linkedin/like.js +1 -0
- package/clis/linkedin/notifications.js +1 -0
- package/clis/linkedin/people-search.js +1 -0
- package/clis/linkedin/post-analytics.js +1 -0
- package/clis/linkedin/post-comments.js +1 -0
- package/clis/linkedin/post-detail.js +1 -0
- package/clis/linkedin/posts-core.js +138 -0
- package/clis/linkedin/posts.js +1 -0
- package/clis/linkedin/profile-analytics.js +1 -0
- package/clis/linkedin/profile-api.js +218 -0
- package/clis/linkedin/profile-experience.js +1 -0
- package/clis/linkedin/profile-projects.js +1 -0
- package/clis/linkedin/profile-read.js +3 -0
- package/clis/linkedin/reply.js +1 -0
- package/clis/linkedin/repost.js +1 -0
- package/clis/linkedin/safe-send.js +155 -0
- package/clis/linkedin/salesnav-inbox.js +21 -0
- package/clis/linkedin/salesnav-message.js +33 -0
- package/clis/linkedin/salesnav-search.js +15 -0
- package/clis/linkedin/salesnav-thread.js +1 -0
- package/clis/linkedin/search-api.js +42 -0
- package/clis/linkedin/search.js +50 -0
- package/clis/linkedin/sent-invitations.js +46 -0
- package/clis/linkedin/services-read.js +57 -0
- package/clis/linkedin/shared.js +10 -0
- package/clis/linkedin/social-api.js +260 -0
- package/clis/linkedin/thread-snapshot.js +81 -0
- package/clis/linkedin/timeline.js +37 -0
- package/clis/linkedin-learning/auth.js +27 -0
- package/clis/linkedin-learning/course.js +17 -0
- package/clis/linkedin-learning/search.js +17 -0
- package/clis/linkedin-learning/trending.js +17 -0
- package/clis/linux-do/auth.js +20 -0
- package/clis/linux-do/categories.js +1 -0
- package/clis/linux-do/feed.js +19 -0
- package/clis/linux-do/search.js +1 -0
- package/clis/linux-do/tags.js +1 -0
- package/clis/linux-do/topic-content.js +28 -0
- package/clis/linux-do/topic.js +1 -0
- package/clis/linux-do/user-posts.js +1 -0
- package/clis/linux-do/user-topics.js +1 -0
- package/clis/lobsters/active.js +1 -0
- package/clis/lobsters/domain.js +1 -0
- package/clis/lobsters/hot.js +1 -0
- package/clis/lobsters/newest.js +1 -0
- package/clis/lobsters/read.js +11 -0
- package/clis/lobsters/tag.js +1 -0
- package/clis/maimai/auth.js +19 -0
- package/clis/maimai/search-talents.js +37 -0
- package/clis/manus/_utils.js +28 -0
- package/clis/manus/auth.js +20 -0
- package/clis/manus/connectors.js +4 -0
- package/clis/manus/credits.js +4 -0
- package/clis/manus/list.js +7 -0
- package/clis/manus/read.js +7 -0
- package/clis/manus/skills.js +4 -0
- package/clis/manus/status.js +8 -0
- package/clis/mastodon/post.js +1 -0
- package/clis/mastodon/shared.js +48 -0
- package/clis/mastodon/whoami.js +1 -0
- package/clis/maven/artifact.js +1 -0
- package/clis/maven/search.js +1 -0
- package/clis/maven/utils.js +1 -0
- package/clis/mdn/search.js +1 -0
- package/clis/medium/article.js +12 -0
- package/clis/medium/feed.js +1 -0
- package/clis/medium/login.js +1 -0
- package/clis/medium/search.js +1 -0
- package/clis/medium/stats.js +56 -0
- package/clis/medium/tag.js +1 -0
- package/clis/medium/user.js +1 -0
- package/clis/medium/utils.js +62 -0
- package/clis/medium/whoami.js +1 -0
- package/clis/mubu/doc.js +1 -0
- package/clis/mubu/docs.js +1 -0
- package/clis/mubu/notes.js +1 -0
- package/clis/mubu/recent.js +1 -0
- package/clis/mubu/search.js +1 -0
- package/clis/mubu/utils.js +31 -0
- package/clis/note/auth.js +12 -0
- package/clis/note/note-utils.js +2 -0
- package/clis/note/publish.js +17 -0
- package/clis/notebooklm/add-source.js +46 -0
- package/clis/notebooklm/auth.js +21 -0
- package/clis/notebooklm/create.js +1 -0
- package/clis/notebooklm/current.js +1 -0
- package/clis/notebooklm/generate-audio.js +1 -0
- package/clis/notebooklm/generate-slides.js +1 -0
- package/clis/notebooklm/get.js +1 -0
- package/clis/notebooklm/history.js +1 -0
- package/clis/notebooklm/list.js +1 -0
- package/clis/notebooklm/note-list.js +1 -0
- package/clis/notebooklm/notes-get.js +1 -0
- package/clis/notebooklm/open.js +1 -0
- package/clis/notebooklm/rpc.js +36 -0
- package/clis/notebooklm/shared.js +1 -0
- package/clis/notebooklm/source-fulltext.js +1 -0
- package/clis/notebooklm/source-get.js +1 -0
- package/clis/notebooklm/source-guide.js +1 -0
- package/clis/notebooklm/source-list.js +1 -0
- package/clis/notebooklm/status.js +1 -0
- package/clis/notebooklm/summary.js +1 -0
- package/clis/notebooklm/utils.js +172 -0
- package/clis/notebooklm/write-note.js +1 -0
- package/clis/nowcoder/auth.js +24 -0
- package/clis/nowcoder/comment.js +1 -0
- package/clis/nowcoder/comments.js +1 -0
- package/clis/nowcoder/companies.js +1 -0
- package/clis/nowcoder/creators.js +1 -0
- package/clis/nowcoder/delete.js +1 -0
- package/clis/nowcoder/detail.js +46 -0
- package/clis/nowcoder/dm-list.js +1 -0
- package/clis/nowcoder/dm-read.js +1 -0
- package/clis/nowcoder/dm-send.js +1 -0
- package/clis/nowcoder/drafts.js +1 -0
- package/clis/nowcoder/experience.js +20 -0
- package/clis/nowcoder/hot.js +1 -0
- package/clis/nowcoder/inbox.js +1 -0
- package/clis/nowcoder/jobs.js +1 -0
- package/clis/nowcoder/like.js +1 -0
- package/clis/nowcoder/my.js +1 -0
- package/clis/nowcoder/notifications.js +16 -0
- package/clis/nowcoder/papers.js +22 -0
- package/clis/nowcoder/post.js +1 -0
- package/clis/nowcoder/practice.js +21 -0
- package/clis/nowcoder/recommend.js +1 -0
- package/clis/nowcoder/referral.js +21 -0
- package/clis/nowcoder/salary.js +22 -0
- package/clis/nowcoder/search.js +31 -0
- package/clis/nowcoder/suggest.js +17 -0
- package/clis/nowcoder/topics.js +1 -0
- package/clis/nowcoder/trending.js +1 -0
- package/clis/nowcoder/utils.js +68 -0
- package/clis/npm/downloads.js +1 -0
- package/clis/npm/package.js +1 -0
- package/clis/npm/search.js +1 -0
- package/clis/npm/utils.js +1 -0
- package/clis/nuget/package.js +1 -0
- package/clis/nuget/search.js +1 -0
- package/clis/nuget/utils.js +1 -0
- package/clis/nvd/cve.js +1 -0
- package/clis/oeis/search.js +1 -0
- package/clis/oeis/sequence.js +1 -0
- package/clis/oeis/utils.js +1 -0
- package/clis/ones/common.js +23 -0
- package/clis/ones/enrich-tasks.js +1 -0
- package/clis/ones/login.js +2 -0
- package/clis/ones/logout.js +1 -0
- package/clis/ones/me.js +1 -0
- package/clis/ones/my-tasks.js +1 -0
- package/clis/ones/resolve-labels.js +1 -0
- package/clis/ones/task-helpers.js +1 -0
- package/clis/ones/task.js +1 -0
- package/clis/ones/tasks.js +1 -0
- package/clis/ones/token-info.js +1 -0
- package/clis/ones/worklog.js +14 -0
- package/clis/openalex/search.js +1 -0
- package/clis/openalex/utils.js +1 -0
- package/clis/openalex/work.js +1 -0
- package/clis/openfda/drug-label.js +1 -0
- package/clis/openfda/food-recall.js +1 -0
- package/clis/openfda/utils.js +1 -0
- package/clis/openreview/author.js +1 -0
- package/clis/openreview/paper.js +1 -0
- package/clis/openreview/reviews.js +4 -0
- package/clis/openreview/search.js +1 -0
- package/clis/openreview/utils.js +1 -0
- package/clis/openreview/venue.js +1 -0
- package/clis/oschina/article.js +1 -0
- package/clis/oschina/catalogs.js +1 -0
- package/clis/oschina/login.js +1 -0
- package/clis/oschina/stats.js +54 -0
- package/clis/oschina/whoami.js +1 -0
- package/clis/osv/query.js +1 -0
- package/clis/osv/utils.js +1 -0
- package/clis/osv/vulnerability.js +1 -0
- package/clis/packagist/package.js +1 -0
- package/clis/packagist/search.js +1 -0
- package/clis/packagist/utils.js +1 -0
- package/clis/paperreview/feedback.js +1 -0
- package/clis/paperreview/review.js +1 -0
- package/clis/paperreview/submit.js +1 -0
- package/clis/paperreview/utils.js +1 -0
- package/clis/pinterest/api.js +1 -0
- package/clis/pinterest/auth.js +1 -0
- package/clis/pinterest/boards.js +1 -0
- package/clis/pinterest/client.js +20 -0
- package/clis/pinterest/publish.js +13 -0
- package/clis/pixiv/auth.js +17 -0
- package/clis/pixiv/detail.js +1 -0
- package/clis/pixiv/download.js +1 -0
- package/clis/pixiv/illusts.js +1 -0
- package/clis/pixiv/ranking.js +26 -0
- package/clis/pixiv/search.js +1 -0
- package/clis/pixiv/user.js +1 -0
- package/clis/pixiv/utils.js +18 -0
- package/clis/powerchina/auth.js +17 -0
- package/clis/powerchina/search.js +1 -0
- package/clis/producthunt/browse.js +54 -0
- package/clis/producthunt/hot.js +64 -0
- package/clis/producthunt/posts.js +1 -0
- package/clis/producthunt/today.js +1 -0
- package/clis/producthunt/utils.js +1 -0
- package/clis/pubmed/article.js +1 -0
- package/clis/pubmed/author.js +1 -0
- package/clis/pubmed/citations.js +1 -0
- package/clis/pubmed/clinical-trial.js +1 -0
- package/clis/pubmed/journal.js +1 -0
- package/clis/pubmed/mesh.js +1 -0
- package/clis/pubmed/related.js +1 -0
- package/clis/pubmed/review.js +1 -0
- package/clis/pubmed/search.js +1 -0
- package/clis/pubmed/utils.js +1 -0
- package/clis/pypi/downloads.js +1 -0
- package/clis/pypi/package.js +1 -0
- package/clis/pypi/utils.js +1 -0
- package/clis/qiita/auth.js +1 -0
- package/clis/qiita/gql.js +32 -0
- package/clis/qiita/publish.js +7 -0
- package/clis/qiita/stats.js +37 -0
- package/clis/qoder/_utils.js +113 -0
- package/clis/qoder/composer.js +1 -0
- package/clis/qoder/history.js +25 -0
- package/clis/qoder/quest.js +1 -0
- package/clis/qoder/read.js +1 -0
- package/clis/qoder/status.js +1 -0
- package/clis/qoder/ui.js +59 -0
- package/clis/quark/auth.js +16 -0
- package/clis/quark/ls.js +1 -0
- package/clis/quark/mkdir.js +1 -0
- package/clis/quark/mv.js +1 -0
- package/clis/quark/rename.js +1 -0
- package/clis/quark/rm.js +1 -0
- package/clis/quark/save.js +1 -0
- package/clis/quark/share-tree.js +1 -0
- package/clis/quark/utils.js +13 -0
- package/clis/quora/create-answer.js +22 -0
- package/clis/quora/create-question.js +24 -0
- package/clis/quora/shared.js +43 -0
- package/clis/quora/whoami.js +1 -0
- package/clis/qwen/ask.js +1 -0
- package/clis/qwen/auth.js +17 -0
- package/clis/qwen/detail.js +1 -0
- package/clis/qwen/history.js +1 -0
- package/clis/qwen/image.js +31 -0
- package/clis/qwen/new.js +1 -0
- package/clis/qwen/read.js +1 -0
- package/clis/qwen/send.js +1 -0
- package/clis/qwen/status.js +1 -0
- package/clis/qwen/utils.js +185 -0
- package/clis/reddit/auth.js +17 -0
- package/clis/reddit/comment.js +36 -0
- package/clis/reddit/frontpage.js +40 -0
- package/clis/reddit/home.js +32 -0
- package/clis/reddit/hot.js +46 -0
- package/clis/reddit/popular.js +46 -0
- package/clis/reddit/read.js +398 -0
- package/clis/reddit/reply.js +56 -0
- package/clis/reddit/save.js +30 -0
- package/clis/reddit/saved.js +24 -0
- package/clis/reddit/search.js +51 -0
- package/clis/reddit/submit.js +42 -0
- package/clis/reddit/subreddit-info.js +29 -0
- package/clis/reddit/subreddit.js +52 -0
- package/clis/reddit/subscribe.js +29 -0
- package/clis/reddit/subscribed.js +68 -0
- package/clis/reddit/upvote.js +43 -0
- package/clis/reddit/upvoted.js +24 -0
- package/clis/reddit/user-comments.js +20 -0
- package/clis/reddit/user-posts.js +17 -0
- package/clis/reddit/user.js +20 -0
- package/clis/reddit/whoami.js +19 -0
- package/clis/rednote/auth.js +19 -0
- package/clis/rednote/comments.js +1 -0
- package/clis/rednote/download.js +1 -0
- package/clis/rednote/feed.js +1 -0
- package/clis/rednote/note.js +1 -0
- package/clis/rednote/notifications.js +67 -0
- package/clis/rednote/search.js +32 -0
- package/clis/rednote/user.js +1 -0
- package/clis/rest-countries/country.js +1 -0
- package/clis/rest-countries/region.js +1 -0
- package/clis/rest-countries/utils.js +1 -0
- package/clis/reuters/article-detail.js +1 -0
- package/clis/reuters/auth.js +39 -0
- package/clis/reuters/search.js +1 -0
- package/clis/reuters/utils.js +50 -0
- package/clis/rfc/rfc.js +1 -0
- package/clis/rfc/utils.js +1 -0
- package/clis/rubygems/gem.js +1 -0
- package/clis/rubygems/search.js +1 -0
- package/clis/rubygems/utils.js +1 -0
- package/clis/segmentfault/_signed-request.js +43 -0
- package/clis/segmentfault/article.js +3 -0
- package/clis/segmentfault/channels.js +1 -0
- package/clis/segmentfault/login.js +1 -0
- package/clis/segmentfault/stats.js +82 -0
- package/clis/segmentfault/tags.js +1 -0
- package/clis/segmentfault/whoami.js +1 -0
- package/clis/semanticscholar/citations.js +1 -0
- package/clis/semanticscholar/paper.js +1 -0
- package/clis/semanticscholar/recommendations.js +1 -0
- package/clis/semanticscholar/search.js +1 -0
- package/clis/semanticscholar/utils.js +1 -0
- package/clis/sinablog/article.js +1 -0
- package/clis/sinablog/hot.js +1 -0
- package/clis/sinablog/search.js +1 -0
- package/clis/sinablog/user.js +1 -0
- package/clis/sinablog/utils.js +153 -0
- package/clis/sinafinance/news.js +1 -0
- package/clis/sinafinance/rolling-news.js +20 -0
- package/clis/sinafinance/stock-rank.js +41 -0
- package/clis/sinafinance/stock.js +1 -0
- package/clis/slock/attachment-download.js +1 -0
- package/clis/slock/attachment-upload.js +34 -0
- package/clis/slock/attachment-url.js +1 -0
- package/clis/slock/auth-verify.js +1 -0
- package/clis/slock/bookmark-add.js +11 -0
- package/clis/slock/bookmark-list.js +10 -0
- package/clis/slock/bookmark-remove.js +7 -0
- package/clis/slock/channel-action.js +1 -0
- package/clis/slock/channel-archive.js +1 -0
- package/clis/slock/channel-create.js +1 -0
- package/clis/slock/channel-files.js +1 -0
- package/clis/slock/channel-info.js +1 -0
- package/clis/slock/channel-join.js +1 -0
- package/clis/slock/channel-leave.js +1 -0
- package/clis/slock/channel-list.js +1 -0
- package/clis/slock/channel-mark.js +1 -0
- package/clis/slock/channel-members.js +1 -0
- package/clis/slock/channel-unarchive.js +1 -0
- package/clis/slock/dm-list.js +1 -0
- package/clis/slock/errors.js +1 -0
- package/clis/slock/in-page.js +113 -0
- package/clis/slock/inbox-done.js +9 -0
- package/clis/slock/inbox-read-all.js +1 -0
- package/clis/slock/inbox.js +1 -0
- package/clis/slock/login.js +1 -0
- package/clis/slock/message-read.js +61 -0
- package/clis/slock/message-search.js +24 -0
- package/clis/slock/message-send.js +55 -0
- package/clis/slock/reaction-add.js +1 -0
- package/clis/slock/reaction-remove.js +1 -0
- package/clis/slock/resolve.js +1 -0
- package/clis/slock/server-list.js +9 -0
- package/clis/slock/server-use.js +18 -0
- package/clis/slock/shared.js +1 -0
- package/clis/slock/task-claim.js +14 -0
- package/clis/slock/task-convert.js +35 -0
- package/clis/slock/task-create.js +24 -0
- package/clis/slock/task-delete.js +9 -0
- package/clis/slock/task-get.js +11 -0
- package/clis/slock/task-list-server.js +12 -0
- package/clis/slock/task-list.js +14 -0
- package/clis/slock/task-status.js +19 -0
- package/clis/slock/task-unclaim.js +13 -0
- package/clis/slock/thread-done.js +1 -0
- package/clis/slock/thread-follow.js +1 -0
- package/clis/slock/thread-list.js +1 -0
- package/clis/slock/thread-state.js +1 -0
- package/clis/slock/thread-undone.js +1 -0
- package/clis/slock/thread-unfollow.js +1 -0
- package/clis/slock/unread-summary.js +18 -0
- package/clis/slock/whoami.js +1 -0
- package/clis/smzdm/search.js +71 -0
- package/clis/sohu/article.js +1 -0
- package/clis/sohu/attributes.js +1 -0
- package/clis/sohu/categories.js +1 -0
- package/clis/sohu/channels.js +1 -0
- package/clis/sohu/columns.js +1 -0
- package/clis/sohu/login.js +1 -0
- package/clis/sohu/mpbp.js +1 -0
- package/clis/sohu/stats.js +95 -0
- package/clis/sohu/topics.js +1 -0
- package/clis/sohu/whoami.js +1 -0
- package/clis/spotify/spotify.js +1 -0
- package/clis/spotify/utils.js +8 -0
- package/clis/stackoverflow/bounties.js +1 -0
- package/clis/stackoverflow/hot.js +1 -0
- package/clis/stackoverflow/read.js +13 -0
- package/clis/stackoverflow/related.js +1 -0
- package/clis/stackoverflow/search.js +1 -0
- package/clis/stackoverflow/tag.js +1 -0
- package/clis/stackoverflow/unanswered.js +1 -0
- package/clis/stackoverflow/user.js +1 -0
- package/clis/stackoverflow/utils.js +1 -0
- package/clis/steam/app.js +1 -0
- package/clis/steam/search.js +1 -0
- package/clis/steam/top-sellers.js +1 -0
- package/clis/steam/utils.js +1 -0
- package/clis/substack/auth.js +11 -0
- package/clis/substack/feed.js +1 -0
- package/clis/substack/post-utils.js +2 -0
- package/clis/substack/publication.js +1 -0
- package/clis/substack/publish.js +10 -0
- package/clis/substack/search.js +1 -0
- package/clis/substack/utils.js +108 -0
- package/clis/suno/auth.js +21 -0
- package/clis/suno/download.js +17 -0
- package/clis/suno/generate.js +4 -0
- package/clis/suno/list.js +14 -0
- package/clis/suno/status.js +1 -0
- package/clis/suno/utils.js +102 -0
- package/clis/taobao/add-cart.js +93 -0
- package/clis/taobao/auth.js +8 -0
- package/clis/taobao/cart.js +68 -0
- package/clis/taobao/detail.js +48 -0
- package/clis/taobao/reviews.js +52 -0
- package/clis/taobao/search.js +64 -0
- package/clis/tdx/hot-rank.js +25 -0
- package/clis/telegram/send.js +18 -0
- package/clis/telegram/shared.js +21 -0
- package/clis/telegram/whoami.js +1 -0
- package/clis/test-utils.js +1 -0
- package/clis/threads/post.js +152 -0
- package/clis/threads/shared.js +27 -0
- package/clis/threads/whoami.js +1 -0
- package/clis/ths/hot-rank.js +27 -0
- package/clis/tieba/hot.js +16 -0
- package/clis/tieba/posts.js +1 -0
- package/clis/tieba/read.js +84 -0
- package/clis/tieba/search.js +54 -0
- package/clis/tieba/utils.js +1 -0
- package/clis/tiktok/auth.js +30 -0
- package/clis/tiktok/comment.js +69 -0
- package/clis/tiktok/creator-videos.js +45 -0
- package/clis/tiktok/explore.js +76 -0
- package/clis/tiktok/follow.js +49 -0
- package/clis/tiktok/following.js +103 -0
- package/clis/tiktok/friends.js +79 -0
- package/clis/tiktok/like.js +19 -0
- package/clis/tiktok/live.js +79 -0
- package/clis/tiktok/notifications.js +77 -0
- package/clis/tiktok/profile.js +26 -0
- package/clis/tiktok/publish.js +82 -0
- package/clis/tiktok/save.js +15 -0
- package/clis/tiktok/search.js +24 -0
- package/clis/tiktok/unfollow.js +59 -0
- package/clis/tiktok/unlike.js +19 -0
- package/clis/tiktok/unsave.js +17 -0
- package/clis/tiktok/user.js +143 -0
- package/clis/tiktok/utils.js +272 -0
- package/clis/toutiao/article.js +1 -0
- package/clis/toutiao/articles.js +6 -0
- package/clis/toutiao/auth.js +50 -0
- package/clis/toutiao/hot.js +1 -0
- package/clis/toutiao/utils.js +2 -0
- package/clis/trae-cn/activity.js +1 -0
- package/clis/trae-cn/approve.js +1 -0
- package/clis/trae-cn/ask.js +1 -0
- package/clis/trae-cn/dump.js +1 -0
- package/clis/trae-cn/export.js +3 -0
- package/clis/trae-cn/model.js +1 -0
- package/clis/trae-cn/new.js +1 -0
- package/clis/trae-cn/read.js +1 -0
- package/clis/trae-cn/screenshot.js +1 -0
- package/clis/trae-cn/select-model.js +1 -0
- package/clis/trae-cn/send.js +1 -0
- package/clis/trae-cn/setup.js +1 -0
- package/clis/trae-cn/status.js +1 -0
- package/clis/trae-cn/targets.js +1 -0
- package/clis/trae-cn/utils.js +456 -0
- package/clis/trae-cn/watch.js +3 -0
- package/clis/trae-solo/_actions.js +41 -0
- package/clis/trae-solo/_fs.js +6 -0
- package/clis/trae-solo/_state.js +2 -0
- package/clis/trae-solo/automation.js +43 -0
- package/clis/trae-solo/history.js +15 -0
- package/clis/trae-solo/mode.js +31 -0
- package/clis/trae-solo/model.js +50 -0
- package/clis/trae-solo/renderer-storage.js +11 -0
- package/clis/trae-solo/settings.js +1 -0
- package/clis/trae-solo/skill-fs.js +1 -0
- package/clis/trae-solo/skill.js +81 -0
- package/clis/trae-solo/state-fs.js +2 -0
- package/clis/trae-solo/status.js +1 -0
- package/clis/trae-solo/task-fs.js +5 -0
- package/clis/trae-solo/user-rules.js +1 -0
- package/clis/trae-solo/workspaces-fs.js +1 -0
- package/clis/tumblr/auth.js +24 -0
- package/clis/tumblr/publish.js +14 -0
- package/clis/tvmaze/search.js +1 -0
- package/clis/tvmaze/show.js +1 -0
- package/clis/tvmaze/utils.js +1 -0
- package/clis/twitter/accept.js +116 -0
- package/clis/twitter/article.js +116 -0
- package/clis/twitter/auth.js +4 -0
- package/clis/twitter/block.js +62 -0
- package/clis/twitter/bookmark-folder.js +4 -0
- package/clis/twitter/bookmark-folders.js +4 -0
- package/clis/twitter/bookmark.js +44 -0
- package/clis/twitter/bookmarks.js +27 -0
- package/clis/twitter/delete.js +36 -0
- package/clis/twitter/device-follow.js +13 -0
- package/clis/twitter/dm-list.js +1 -0
- package/clis/twitter/dm-read.js +1 -0
- package/clis/twitter/dm-send.js +13 -0
- package/clis/twitter/dm-shared.js +6 -0
- package/clis/twitter/download.js +38 -0
- package/clis/twitter/follow-batch.js +43 -0
- package/clis/twitter/follow.js +39 -0
- package/clis/twitter/followers.js +59 -0
- package/clis/twitter/following.js +4 -0
- package/clis/twitter/hide-reply.js +57 -0
- package/clis/twitter/like.js +48 -0
- package/clis/twitter/likes.js +14 -0
- package/clis/twitter/list-add-batch.js +1 -0
- package/clis/twitter/list-add-core.js +35 -0
- package/clis/twitter/list-add.js +1 -0
- package/clis/twitter/list-batch-utils.js +1 -0
- package/clis/twitter/list-create.js +12 -0
- package/clis/twitter/list-delete.js +36 -0
- package/clis/twitter/list-remove-batch.js +1 -0
- package/clis/twitter/list-remove-core.js +127 -0
- package/clis/twitter/list-remove.js +1 -0
- package/clis/twitter/list-tweets.js +27 -0
- package/clis/twitter/lists.js +27 -0
- package/clis/twitter/notifications.js +4 -0
- package/clis/twitter/post.js +158 -0
- package/clis/twitter/profile.js +66 -0
- package/clis/twitter/quote.js +123 -0
- package/clis/twitter/reply-dm.js +112 -0
- package/clis/twitter/reply.js +97 -0
- package/clis/twitter/retweet.js +62 -0
- package/clis/twitter/schedule.js +96 -0
- package/clis/twitter/scheduled-delete.js +60 -0
- package/clis/twitter/scheduled-list.js +15 -0
- package/clis/twitter/scheduled-utils.js +18 -0
- package/clis/twitter/search.js +12 -0
- package/clis/twitter/shared.js +76 -0
- package/clis/twitter/thread.js +4 -0
- package/clis/twitter/timeline.js +4 -0
- package/clis/twitter/trending.js +18 -0
- package/clis/twitter/tweets.js +12 -0
- package/clis/twitter/unblock.js +45 -0
- package/clis/twitter/unbookmark.js +41 -0
- package/clis/twitter/unfollow.js +45 -0
- package/clis/twitter/unlike.js +48 -0
- package/clis/twitter/unretweet.js +62 -0
- package/clis/twitter/utils.js +55 -0
- package/clis/uisdc/news.js +25 -0
- package/clis/uiverse/_shared.js +257 -0
- package/clis/uiverse/code.js +1 -0
- package/clis/uiverse/preview.js +1 -0
- package/clis/upwork/auth.js +19 -0
- package/clis/upwork/detail.js +22 -0
- package/clis/upwork/feed.js +21 -0
- package/clis/upwork/search.js +21 -0
- package/clis/upwork/utils.js +1 -0
- package/clis/v2ex/auth.js +10 -0
- package/clis/v2ex/daily.js +41 -0
- package/clis/v2ex/hot.js +1 -0
- package/clis/v2ex/latest.js +1 -0
- package/clis/v2ex/me.js +58 -0
- package/clis/v2ex/member.js +1 -0
- package/clis/v2ex/node.js +1 -0
- package/clis/v2ex/nodes.js +1 -0
- package/clis/v2ex/notifications.js +40 -0
- package/clis/v2ex/replies.js +1 -0
- package/clis/v2ex/topic.js +1 -0
- package/clis/v2ex/user.js +1 -0
- package/clis/vk/post.js +1 -0
- package/clis/vk/shared.js +8 -0
- package/clis/vk/whoami.js +1 -0
- package/clis/wanfang/search.js +42 -0
- package/clis/web/read.js +260 -0
- package/clis/wechat-channels/auth.js +31 -0
- package/clis/wechat-channels/publish.js +298 -0
- package/clis/weibo/article.js +1 -0
- package/clis/weibo/auth.js +17 -0
- package/clis/weibo/comments.js +28 -0
- package/clis/weibo/delete.js +84 -0
- package/clis/weibo/favorites.js +27 -0
- package/clis/weibo/feed.js +33 -0
- package/clis/weibo/hot.js +17 -0
- package/clis/weibo/me.js +51 -0
- package/clis/weibo/post.js +46 -0
- package/clis/weibo/publish.js +98 -0
- package/clis/weibo/search.js +47 -0
- package/clis/weibo/user-posts.js +92 -0
- package/clis/weibo/user.js +37 -0
- package/clis/weibo/utils.js +16 -0
- package/clis/weixin/article.js +1 -0
- package/clis/weixin/create-draft.js +152 -0
- package/clis/weixin/download.js +100 -0
- package/clis/weixin/drafts.js +27 -0
- package/clis/weixin/login.js +1 -0
- package/clis/weixin/search.js +44 -0
- package/clis/weixin/stats.js +43 -0
- package/clis/weixin/whoami.js +1 -0
- package/clis/weread/ai-outline.js +2 -0
- package/clis/weread/auth.js +24 -0
- package/clis/weread/book-search.js +2 -0
- package/clis/weread/book.js +3 -0
- package/clis/weread/highlights.js +1 -0
- package/clis/weread/notebooks.js +1 -0
- package/clis/weread/notes.js +1 -0
- package/clis/weread/ranking.js +1 -0
- package/clis/weread/search.js +1 -0
- package/clis/weread/shelf.js +1 -0
- package/clis/weread/utils.js +67 -0
- package/clis/weread-official/book.js +1 -0
- package/clis/weread-official/discover.js +1 -0
- package/clis/weread-official/list-apis.js +1 -0
- package/clis/weread-official/notes.js +1 -0
- package/clis/weread-official/readdata.js +1 -0
- package/clis/weread-official/review.js +1 -0
- package/clis/weread-official/search.js +1 -0
- package/clis/weread-official/shelf.js +1 -0
- package/clis/weread-official/utils.js +1 -0
- package/clis/wikidata/entity.js +1 -0
- package/clis/wikidata/search.js +1 -0
- package/clis/wikidata/utils.js +1 -0
- package/clis/wikipedia/page.js +3 -0
- package/clis/wikipedia/random.js +1 -0
- package/clis/wikipedia/search.js +1 -0
- package/clis/wikipedia/summary.js +1 -0
- package/clis/wikipedia/trending.js +1 -0
- package/clis/wikipedia/utils.js +1 -0
- package/clis/wordpress/login.js +1 -0
- package/clis/wordpress/publish.js +1 -0
- package/clis/wordpress/shared.js +54 -0
- package/clis/wordpress/whoami.js +1 -0
- package/clis/woshipm/article.js +1 -0
- package/clis/woshipm/login.js +1 -0
- package/clis/woshipm/stats.js +52 -0
- package/clis/woshipm/whoami.js +1 -0
- package/clis/wttr/current.js +1 -0
- package/clis/wttr/forecast.js +1 -0
- package/clis/wttr/utils.js +1 -0
- package/clis/xianyu/auth.js +11 -0
- package/clis/xianyu/chat.js +1 -0
- package/clis/xianyu/im.js +240 -0
- package/clis/xianyu/inbox.js +1 -0
- package/clis/xianyu/item.js +97 -0
- package/clis/xianyu/messages.js +1 -0
- package/clis/xianyu/publish.js +245 -0
- package/clis/xianyu/reply.js +1 -0
- package/clis/xianyu/search.js +141 -0
- package/clis/xianyu/utils.js +1 -0
- package/clis/xiaoe/auth.js +10 -0
- package/clis/xiaoe/catalog.js +134 -0
- package/clis/xiaoe/content.js +16 -0
- package/clis/xiaoe/courses.js +43 -0
- package/clis/xiaoe/detail.js +19 -0
- package/clis/xiaoe/play-url.js +97 -0
- package/clis/xiaohongshu/ask.js +130 -0
- package/clis/xiaohongshu/auth.js +13 -0
- package/clis/xiaohongshu/collection-helpers.js +64 -0
- package/clis/xiaohongshu/comments.js +89 -0
- package/clis/xiaohongshu/creator-note-detail.js +80 -0
- package/clis/xiaohongshu/creator-notes-summary.js +1 -0
- package/clis/xiaohongshu/creator-notes.js +107 -0
- package/clis/xiaohongshu/creator-profile.js +13 -0
- package/clis/xiaohongshu/creator-stats.js +13 -0
- package/clis/xiaohongshu/delete-note.js +69 -0
- package/clis/xiaohongshu/download.js +200 -0
- package/clis/xiaohongshu/draft-clear.js +44 -0
- package/clis/xiaohongshu/draft-delete.js +37 -0
- package/clis/xiaohongshu/draft-open.js +1 -0
- package/clis/xiaohongshu/draft-utils.js +36 -0
- package/clis/xiaohongshu/drafts.js +1 -0
- package/clis/xiaohongshu/feed.js +38 -0
- package/clis/xiaohongshu/follow.js +75 -0
- package/clis/xiaohongshu/liked.js +1 -0
- package/clis/xiaohongshu/note-helpers.js +1 -0
- package/clis/xiaohongshu/note.js +32 -0
- package/clis/xiaohongshu/notifications.js +1 -0
- package/clis/xiaohongshu/publish-video.js +87 -0
- package/clis/xiaohongshu/publish.js +637 -0
- package/clis/xiaohongshu/saved.js +1 -0
- package/clis/xiaohongshu/search.js +194 -0
- package/clis/xiaohongshu/unfollow.js +98 -0
- package/clis/xiaohongshu/user-helpers.js +1 -0
- package/clis/xiaohongshu/user.js +30 -0
- package/clis/xiaoyuzhou/auth.js +3 -0
- package/clis/xiaoyuzhou/download.js +1 -0
- package/clis/xiaoyuzhou/episode.js +1 -0
- package/clis/xiaoyuzhou/podcast-episodes.js +1 -0
- package/clis/xiaoyuzhou/podcast.js +1 -0
- package/clis/xiaoyuzhou/transcript.js +1 -0
- package/clis/xiaoyuzhou/utils.js +1 -0
- package/clis/xueqiu/article.js +4 -0
- package/clis/xueqiu/auth.js +27 -0
- package/clis/xueqiu/comments.js +38 -0
- package/clis/xueqiu/danjuan-utils.js +84 -0
- package/clis/xueqiu/earnings-date.js +1 -0
- package/clis/xueqiu/events.js +17 -0
- package/clis/xueqiu/feed.js +1 -0
- package/clis/xueqiu/fund-holdings.js +1 -0
- package/clis/xueqiu/fund-snapshot.js +1 -0
- package/clis/xueqiu/groups.js +1 -0
- package/clis/xueqiu/hashtags.js +26 -0
- package/clis/xueqiu/hot-stock.js +1 -0
- package/clis/xueqiu/hot.js +1 -0
- package/clis/xueqiu/kline.js +1 -0
- package/clis/xueqiu/search.js +1 -0
- package/clis/xueqiu/stock.js +1 -0
- package/clis/xueqiu/stocks.js +13 -0
- package/clis/xueqiu/users.js +12 -0
- package/clis/xueqiu/utils.js +9 -0
- package/clis/xueqiu/watchlist.js +1 -0
- package/clis/yahoo/search.js +21 -0
- package/clis/yahoo-finance/quote.js +50 -0
- package/clis/yollomi/background.js +1 -0
- package/clis/yollomi/edit.js +1 -0
- package/clis/yollomi/face-swap.js +1 -0
- package/clis/yollomi/generate.js +1 -0
- package/clis/yollomi/models.js +1 -0
- package/clis/yollomi/object-remover.js +1 -0
- package/clis/yollomi/remove-bg.js +1 -0
- package/clis/yollomi/restore.js +1 -0
- package/clis/yollomi/try-on.js +1 -0
- package/clis/yollomi/upload.js +17 -0
- package/clis/yollomi/upscale.js +1 -0
- package/clis/yollomi/utils.js +16 -0
- package/clis/yollomi/video.js +1 -0
- package/clis/youdao/note.js +113 -0
- package/clis/youtube/auth.js +20 -0
- package/clis/youtube/channel.js +118 -0
- package/clis/youtube/comments.js +64 -0
- package/clis/youtube/feed.js +89 -0
- package/clis/youtube/history.js +87 -0
- package/clis/youtube/like.js +33 -0
- package/clis/youtube/playlist.js +47 -0
- package/clis/youtube/publish.js +56 -0
- package/clis/youtube/search.js +39 -0
- package/clis/youtube/subscribe.js +42 -0
- package/clis/youtube/subscriptions.js +26 -0
- package/clis/youtube/transcript-group.js +2 -0
- package/clis/youtube/transcript.js +417 -0
- package/clis/youtube/unlike.js +33 -0
- package/clis/youtube/unsubscribe.js +42 -0
- package/clis/youtube/utils.js +34 -0
- package/clis/youtube/video.js +96 -0
- package/clis/youtube/watch-later.js +41 -0
- package/clis/yuanbao/ask.js +145 -0
- package/clis/yuanbao/auth.js +23 -0
- package/clis/yuanbao/detail.js +1 -0
- package/clis/yuanbao/history.js +1 -0
- package/clis/yuanbao/new.js +16 -0
- package/clis/yuanbao/read.js +1 -0
- package/clis/yuanbao/send.js +1 -0
- package/clis/yuanbao/shared.js +127 -0
- package/clis/yuanbao/status.js +1 -0
- package/clis/yuque/article.js +1 -0
- package/clis/yuque/whoami.js +1 -0
- package/clis/zhihu/answer-comments.js +11 -0
- package/clis/zhihu/answer-detail.js +11 -0
- package/clis/zhihu/answer.js +15 -0
- package/clis/zhihu/article-transform.js +1 -0
- package/clis/zhihu/article.js +7 -0
- package/clis/zhihu/auth.js +11 -0
- package/clis/zhihu/collection.js +7 -0
- package/clis/zhihu/collections.js +7 -0
- package/clis/zhihu/comment.js +17 -0
- package/clis/zhihu/download.js +39 -0
- package/clis/zhihu/favorite.js +39 -0
- package/clis/zhihu/follow.js +19 -0
- package/clis/zhihu/followers.js +1 -0
- package/clis/zhihu/following.js +1 -0
- package/clis/zhihu/hot.js +21 -0
- package/clis/zhihu/like.js +16 -0
- package/clis/zhihu/paginate.js +11 -0
- package/clis/zhihu/pin.js +24 -0
- package/clis/zhihu/pins.js +1 -0
- package/clis/zhihu/question.js +7 -0
- package/clis/zhihu/recommend.js +7 -0
- package/clis/zhihu/search.js +11 -0
- package/clis/zhihu/stats.js +41 -0
- package/clis/zhihu/target.js +1 -0
- package/clis/zhihu/text.js +6 -0
- package/clis/zhihu/user-answers.js +1 -0
- package/clis/zhihu/user-arg.js +1 -0
- package/clis/zhihu/user-articles.js +1 -0
- package/clis/zhihu/user.js +11 -0
- package/clis/zhihu/write-shared.js +71 -0
- package/clis/zlibrary/info.js +1 -0
- package/clis/zlibrary/search.js +1 -0
- package/clis/zlibrary/utils.js +48 -0
- package/clis/zsxq/auth.js +33 -0
- package/clis/zsxq/dynamics.js +1 -0
- package/clis/zsxq/groups.js +1 -0
- package/clis/zsxq/search.js +1 -0
- package/clis/zsxq/topic.js +1 -0
- package/clis/zsxq/topics.js +1 -0
- package/clis/zsxq/utils.js +72 -0
- package/dist/src/adapter-shadow.d.ts +11 -0
- package/dist/src/adapter-shadow.js +2 -0
- package/dist/src/adapter-shadow.test.d.ts +1 -0
- package/dist/src/adapter-source.d.ts +11 -0
- package/dist/src/adapter-source.js +1 -0
- package/dist/src/adapter-source.test.d.ts +1 -0
- package/dist/src/browser/analyze.d.ts +118 -0
- package/dist/src/browser/analyze.js +1 -0
- package/dist/src/browser/analyze.test.d.ts +1 -0
- package/dist/src/browser/article-extract.d.ts +57 -0
- package/dist/src/browser/article-extract.e2e.test.d.ts +1 -0
- package/dist/src/browser/article-extract.js +2 -0
- package/dist/src/browser/article-extract.test.d.ts +1 -0
- package/dist/src/browser/ax-snapshot.d.ts +37 -0
- package/dist/src/browser/ax-snapshot.js +2 -0
- package/dist/src/browser/ax-snapshot.test.d.ts +1 -0
- package/dist/src/browser/base-page.d.ts +151 -0
- package/dist/src/browser/base-page.js +225 -0
- package/dist/src/browser/base-page.test.d.ts +1 -0
- package/dist/src/browser/bridge-readiness.d.ts +14 -0
- package/dist/src/browser/bridge-readiness.js +1 -0
- package/dist/src/browser/bridge-readiness.test.d.ts +1 -0
- package/dist/src/browser/bridge.d.ts +26 -0
- package/dist/src/browser/bridge.js +1 -0
- package/dist/src/browser/cdp-click-fixture.test.d.ts +1 -0
- package/dist/src/browser/cdp.d.ts +51 -0
- package/dist/src/browser/cdp.js +1 -0
- package/dist/src/browser/cdp.test.d.ts +1 -0
- package/dist/src/browser/compound.d.ts +59 -0
- package/dist/src/browser/compound.js +82 -0
- package/dist/src/browser/compound.test.d.ts +1 -0
- package/dist/src/browser/config.d.ts +2 -0
- package/dist/src/browser/config.js +1 -0
- package/dist/src/browser/daemon-client.d.ts +79 -0
- package/dist/src/browser/daemon-client.js +1 -0
- package/dist/src/browser/daemon-client.test.d.ts +1 -0
- package/dist/src/browser/daemon-lifecycle.d.ts +37 -0
- package/dist/src/browser/daemon-lifecycle.js +12 -0
- package/dist/src/browser/daemon-transport.d.ts +55 -0
- package/dist/src/browser/daemon-transport.js +1 -0
- package/dist/src/browser/daemon-version.d.ts +4 -0
- package/dist/src/browser/daemon-version.js +2 -0
- package/dist/src/browser/dom-helpers.d.ts +41 -0
- package/dist/src/browser/dom-helpers.js +166 -0
- package/dist/src/browser/dom-helpers.test.d.ts +1 -0
- package/dist/src/browser/dom-snapshot.d.ts +93 -0
- package/dist/src/browser/dom-snapshot.js +809 -0
- package/dist/src/browser/dom-snapshot.test.d.ts +11 -0
- package/dist/src/browser/errors.d.ts +38 -0
- package/dist/src/browser/errors.js +5 -0
- package/dist/src/browser/errors.test.d.ts +1 -0
- package/dist/src/browser/extract.d.ts +69 -0
- package/dist/src/browser/extract.js +42 -0
- package/dist/src/browser/extract.test.d.ts +1 -0
- package/dist/src/browser/find.d.ts +84 -0
- package/dist/src/browser/find.js +328 -0
- package/dist/src/browser/find.test.d.ts +1 -0
- package/dist/src/browser/fingerprint.d.ts +44 -0
- package/dist/src/browser/fingerprint.js +82 -0
- package/dist/src/browser/html-tree.d.ts +75 -0
- package/dist/src/browser/html-tree.js +61 -0
- package/dist/src/browser/html-tree.test.d.ts +1 -0
- package/dist/src/browser/index.d.ts +14 -0
- package/dist/src/browser/index.js +1 -0
- package/dist/src/browser/managed-chrome.d.ts +89 -0
- package/dist/src/browser/managed-chrome.js +1 -0
- package/dist/src/browser/network-cache.d.ts +49 -0
- package/dist/src/browser/network-cache.js +1 -0
- package/dist/src/browser/network-cache.test.d.ts +1 -0
- package/dist/src/browser/network-key.d.ts +22 -0
- package/dist/src/browser/network-key.js +1 -0
- package/dist/src/browser/network-key.test.d.ts +1 -0
- package/dist/src/browser/page.d.ts +83 -0
- package/dist/src/browser/page.js +15 -0
- package/dist/src/browser/page.test.d.ts +1 -0
- package/dist/src/browser/profile.d.ts +96 -0
- package/dist/src/browser/profile.js +2 -0
- package/dist/src/browser/proxy-test.d.ts +28 -0
- package/dist/src/browser/proxy-test.js +12 -0
- package/dist/src/browser/shape-filter.d.ts +52 -0
- package/dist/src/browser/shape-filter.js +1 -0
- package/dist/src/browser/shape-filter.test.d.ts +1 -0
- package/dist/src/browser/shape.d.ts +23 -0
- package/dist/src/browser/shape.js +1 -0
- package/dist/src/browser/shape.test.d.ts +1 -0
- package/dist/src/browser/stealth.d.ts +18 -0
- package/dist/src/browser/stealth.js +391 -0
- package/dist/src/browser/stealth.test.d.ts +1 -0
- package/dist/src/browser/tabs.d.ts +13 -0
- package/dist/src/browser/tabs.js +2 -0
- package/dist/src/browser/target-errors.d.ts +39 -0
- package/dist/src/browser/target-errors.js +1 -0
- package/dist/src/browser/target-errors.test.d.ts +1 -0
- package/dist/src/browser/target-resolver.d.ts +158 -0
- package/dist/src/browser/target-resolver.js +423 -0
- package/dist/src/browser/target-resolver.test.d.ts +1 -0
- package/dist/src/browser/trace.d.ts +21 -0
- package/dist/src/browser/trace.js +2 -0
- package/dist/src/browser/utils.d.ts +20 -0
- package/dist/src/browser/utils.js +1 -0
- package/dist/src/browser/utils.test.d.ts +1 -0
- package/dist/src/browser/verify-fixture.d.ts +65 -0
- package/dist/src/browser/verify-fixture.js +2 -0
- package/dist/src/browser/verify-fixture.test.d.ts +1 -0
- package/dist/src/browser/visual-refs.d.ts +11 -0
- package/dist/src/browser/visual-refs.js +94 -0
- package/dist/src/browser-session-lock.d.ts +13 -0
- package/dist/src/browser-session-lock.js +1 -0
- package/dist/src/browser-session-lock.test.d.ts +1 -0
- package/dist/src/browser.test.d.ts +1 -0
- package/dist/src/build-manifest.d.ts +103 -0
- package/dist/src/build-manifest.js +16 -0
- package/dist/src/build-manifest.test.d.ts +1 -0
- package/dist/src/capabilityRouting.d.ts +19 -0
- package/dist/src/capabilityRouting.js +1 -0
- package/dist/src/capabilityRouting.test.d.ts +1 -0
- package/dist/src/cli-argv-preprocess.d.ts +63 -0
- package/dist/src/cli-argv-preprocess.js +1 -0
- package/dist/src/cli-argv-preprocess.test.d.ts +1 -0
- package/dist/src/cli.d.ts +79 -0
- package/dist/src/cli.js +132 -0
- package/dist/src/cli.test.d.ts +1 -0
- package/dist/src/commanderAdapter.d.ts +21 -0
- package/dist/src/commanderAdapter.js +3 -0
- package/dist/src/commanderAdapter.test.d.ts +1 -0
- package/dist/src/commands/auth.d.ts +40 -0
- package/dist/src/commands/auth.js +2 -0
- package/dist/src/commands/auth.test.d.ts +1 -0
- package/dist/src/commands/daemon.d.ts +25 -0
- package/dist/src/commands/daemon.js +1 -0
- package/dist/src/commands/daemon.test.d.ts +1 -0
- package/dist/src/completion-fast.d.ts +22 -0
- package/dist/src/completion-fast.js +1 -0
- package/dist/src/completion-shared.d.ts +13 -0
- package/dist/src/completion-shared.js +30 -0
- package/dist/src/completion.d.ts +21 -0
- package/dist/src/completion.js +1 -0
- package/dist/src/completion.test.d.ts +1 -0
- package/dist/src/constants.d.ts +22 -0
- package/dist/src/constants.js +1 -0
- package/dist/src/convention-audit.d.ts +50 -0
- package/dist/src/convention-audit.js +2 -0
- package/dist/src/convention-audit.test.d.ts +1 -0
- package/dist/src/daemon-utils.d.ts +18 -0
- package/dist/src/daemon-utils.js +1 -0
- package/dist/src/daemon.d.ts +22 -0
- package/dist/src/daemon.js +1 -0
- package/dist/src/daemon.test.d.ts +1 -0
- package/dist/src/discovery.d.ts +43 -0
- package/dist/src/discovery.js +2 -0
- package/dist/src/doctor.d.ts +38 -0
- package/dist/src/doctor.js +13 -0
- package/dist/src/doctor.test.d.ts +1 -0
- package/dist/src/download/article-download.d.ts +72 -0
- package/dist/src/download/article-download.js +21 -0
- package/dist/src/download/article-download.test.d.ts +1 -0
- package/dist/src/download/index.d.ts +71 -0
- package/dist/src/download/index.js +7 -0
- package/dist/src/download/index.test.d.ts +1 -0
- package/dist/src/download/media-download.d.ts +49 -0
- package/dist/src/download/media-download.js +1 -0
- package/dist/src/download/media-download.test.d.ts +1 -0
- package/dist/src/download/progress.d.ts +36 -0
- package/dist/src/download/progress.js +5 -0
- package/dist/src/download/progress.test.d.ts +1 -0
- package/dist/src/electron-apps.d.ts +31 -0
- package/dist/src/electron-apps.js +1 -0
- package/dist/src/electron-apps.test.d.ts +1 -0
- package/dist/src/engine.test.d.ts +1 -0
- package/dist/src/errors.d.ts +117 -0
- package/dist/src/errors.js +2 -0
- package/dist/src/errors.test.d.ts +1 -0
- package/dist/src/execution.d.ts +24 -0
- package/dist/src/execution.js +2 -0
- package/dist/src/execution.test.d.ts +1 -0
- package/dist/src/extension-manifest-regression.test.d.ts +1 -0
- package/dist/src/external-clis.yaml +109 -0
- package/dist/src/external.d.ts +49 -0
- package/dist/src/external.js +1 -0
- package/dist/src/external.test.d.ts +1 -0
- package/dist/src/help.d.ts +88 -0
- package/dist/src/help.js +8 -0
- package/dist/src/help.test.d.ts +1 -0
- package/dist/src/hooks.d.ts +46 -0
- package/dist/src/hooks.js +1 -0
- package/dist/src/hooks.test.d.ts +4 -0
- package/dist/src/interceptor.d.ts +44 -0
- package/dist/src/interceptor.js +123 -0
- package/dist/src/interceptor.test.d.ts +4 -0
- package/dist/src/launcher.d.ts +41 -0
- package/dist/src/launcher.js +7 -0
- package/dist/src/launcher.test.d.ts +1 -0
- package/dist/src/logger.d.ts +26 -0
- package/dist/src/logger.js +9 -0
- package/dist/src/main.d.ts +5 -0
- package/dist/src/main.js +10 -0
- package/dist/src/manifest-types.d.ts +43 -0
- package/dist/src/manifest-types.js +1 -0
- package/dist/src/node-network.d.ts +10 -0
- package/dist/src/node-network.js +1 -0
- package/dist/src/node-network.test.d.ts +1 -0
- package/dist/src/observation/artifact.d.ts +16 -0
- package/dist/src/observation/artifact.js +8 -0
- package/dist/src/observation/artifact.test.d.ts +1 -0
- package/dist/src/observation/events.d.ts +89 -0
- package/dist/src/observation/events.js +1 -0
- package/dist/src/observation/index.d.ts +7 -0
- package/dist/src/observation/index.js +1 -0
- package/dist/src/observation/manager.d.ts +9 -0
- package/dist/src/observation/manager.js +1 -0
- package/dist/src/observation/manager.test.d.ts +1 -0
- package/dist/src/observation/redaction.d.ts +11 -0
- package/dist/src/observation/redaction.js +2 -0
- package/dist/src/observation/redaction.test.d.ts +1 -0
- package/dist/src/observation/retention.d.ts +32 -0
- package/dist/src/observation/retention.js +1 -0
- package/dist/src/observation/retention.test.d.ts +1 -0
- package/dist/src/observation/ring-buffer.d.ts +22 -0
- package/dist/src/observation/ring-buffer.js +1 -0
- package/dist/src/observation/ring-buffer.test.d.ts +1 -0
- package/dist/src/observation/session.d.ts +25 -0
- package/dist/src/observation/session.js +1 -0
- package/dist/src/output.d.ts +14 -0
- package/dist/src/output.js +2 -0
- package/dist/src/output.test.d.ts +1 -0
- package/dist/src/package-exports.test.d.ts +1 -0
- package/dist/src/package-paths.d.ts +8 -0
- package/dist/src/package-paths.js +1 -0
- package/dist/src/pipeline/executor.d.ts +11 -0
- package/dist/src/pipeline/executor.js +1 -0
- package/dist/src/pipeline/executor.test.d.ts +4 -0
- package/dist/src/pipeline/index.d.ts +5 -0
- package/dist/src/pipeline/index.js +1 -0
- package/dist/src/pipeline/registry.d.ts +28 -0
- package/dist/src/pipeline/registry.js +1 -0
- package/dist/src/pipeline/steps/browser.d.ts +13 -0
- package/dist/src/pipeline/steps/browser.js +1 -0
- package/dist/src/pipeline/steps/download.d.ts +18 -0
- package/dist/src/pipeline/steps/download.js +1 -0
- package/dist/src/pipeline/steps/download.test.d.ts +1 -0
- package/dist/src/pipeline/steps/fetch.d.ts +5 -0
- package/dist/src/pipeline/steps/fetch.js +31 -0
- package/dist/src/pipeline/steps/fetch.test.d.ts +1 -0
- package/dist/src/pipeline/steps/intercept.d.ts +5 -0
- package/dist/src/pipeline/steps/intercept.js +1 -0
- package/dist/src/pipeline/steps/tap.d.ts +12 -0
- package/dist/src/pipeline/steps/tap.js +53 -0
- package/dist/src/pipeline/steps/transform.d.ts +9 -0
- package/dist/src/pipeline/steps/transform.js +1 -0
- package/dist/src/pipeline/template.d.ts +17 -0
- package/dist/src/pipeline/template.js +1 -0
- package/dist/src/pipeline/template.test.d.ts +4 -0
- package/dist/src/pipeline/transform.test.d.ts +4 -0
- package/dist/src/plugin-manifest.d.ts +70 -0
- package/dist/src/plugin-manifest.js +1 -0
- package/dist/src/plugin-manifest.test.d.ts +4 -0
- package/dist/src/plugin-scaffold.d.ts +28 -0
- package/dist/src/plugin-scaffold.js +75 -0
- package/dist/src/plugin-scaffold.test.d.ts +4 -0
- package/dist/src/plugin.d.ts +145 -0
- package/dist/src/plugin.js +20 -0
- package/dist/src/plugin.test.d.ts +4 -0
- package/dist/src/rate-limit.d.ts +15 -0
- package/dist/src/rate-limit.js +2 -0
- package/dist/src/rate-limit.test.d.ts +1 -0
- package/dist/src/registry-api.d.ts +13 -0
- package/dist/src/registry-api.js +1 -0
- package/dist/src/registry.d.ts +130 -0
- package/dist/src/registry.js +1 -0
- package/dist/src/registry.test.d.ts +4 -0
- package/dist/src/runtime-detect.d.ts +31 -0
- package/dist/src/runtime-detect.js +1 -0
- package/dist/src/runtime-detect.test.d.ts +1 -0
- package/dist/src/runtime.d.ts +57 -0
- package/dist/src/runtime.js +1 -0
- package/dist/src/scripts/framework.d.ts +7 -0
- package/dist/src/scripts/framework.js +1 -0
- package/dist/src/scripts/interact.d.ts +4 -0
- package/dist/src/scripts/interact.js +1 -0
- package/dist/src/scripts/store.d.ts +13 -0
- package/dist/src/scripts/store.js +1 -0
- package/dist/src/serialization.d.ts +42 -0
- package/dist/src/serialization.js +4 -0
- package/dist/src/serialization.test.d.ts +1 -0
- package/dist/src/skills.d.ts +14 -0
- package/dist/src/skills.js +6 -0
- package/dist/src/skills.test.d.ts +1 -0
- package/dist/src/snapshotFormatter.d.ts +11 -0
- package/dist/src/snapshotFormatter.js +3 -0
- package/dist/src/snapshotFormatter.test.d.ts +7 -0
- package/dist/src/tui.d.ts +28 -0
- package/dist/src/tui.js +16 -0
- package/dist/src/tui.test.d.ts +1 -0
- package/dist/src/types.d.ts +236 -0
- package/dist/src/types.js +1 -0
- package/dist/src/utils.d.ts +57 -0
- package/dist/src/utils.js +38 -0
- package/dist/src/utils.test.d.ts +1 -0
- package/dist/src/validate.d.ts +21 -0
- package/dist/src/validate.js +3 -0
- package/dist/src/validate.test.d.ts +9 -0
- package/dist/src/verify.d.ts +27 -0
- package/dist/src/verify.js +2 -0
- package/dist/src/verify.test.d.ts +8 -0
- package/dist/src/version.d.ts +4 -0
- package/dist/src/version.js +1 -0
- package/dist/src/weixin-download.test.d.ts +1 -0
- package/docs/guide/browser-bridge.md +94 -0
- package/docs/guide/electron-app-cli.md +199 -0
- package/docs/guide/exit-codes.md +24 -0
- package/docs/guide/extending-opencli.md +134 -0
- package/docs/guide/getting-started.md +81 -0
- package/docs/guide/installation.md +52 -0
- package/docs/guide/plugins.md +226 -0
- package/docs/guide/remote-orchestration.md +116 -0
- package/docs/guide/troubleshooting.md +69 -0
- package/package.json +116 -0
- package/scripts/check-doc-coverage.sh +81 -0
- package/scripts/check-listing-id-pairing.mjs +193 -0
- package/scripts/check-silent-column-drop.mjs +105 -0
- package/scripts/check-typed-error-lint.mjs +118 -0
- package/scripts/clean-dist.cjs +13 -0
- package/scripts/copy-yaml.cjs +12 -0
- package/scripts/fetch-adapters.js +293 -0
- package/scripts/minify-release.mjs +115 -0
- package/scripts/postinstall.js +174 -0
- package/scripts/silent-column-drop-baseline.json +910 -0
- package/scripts/typed-error-lint-baseline.json +1098 -0
- package/skills/opencli-adapter-author/SKILL.md +256 -0
- package/skills/opencli-adapter-author/references/adapter-template.md +471 -0
- package/skills/opencli-adapter-author/references/api-discovery.md +295 -0
- package/skills/opencli-adapter-author/references/coverage-matrix.md +81 -0
- package/skills/opencli-adapter-author/references/field-conventions.md +172 -0
- package/skills/opencli-adapter-author/references/field-decode-playbook.md +181 -0
- package/skills/opencli-adapter-author/references/jsdom-fixture-pattern.md +196 -0
- package/skills/opencli-adapter-author/references/output-design.md +149 -0
- package/skills/opencli-adapter-author/references/site-memory/bilibili.md +70 -0
- package/skills/opencli-adapter-author/references/site-memory/eastmoney.md +70 -0
- package/skills/opencli-adapter-author/references/site-memory/tonghuashun.md +51 -0
- package/skills/opencli-adapter-author/references/site-memory/xueqiu.md +58 -0
- package/skills/opencli-adapter-author/references/site-memory.md +231 -0
- package/skills/opencli-adapter-author/references/site-recon.md +134 -0
- package/skills/opencli-adapter-author/references/strategy-selection.md +169 -0
- package/skills/opencli-adapter-author/references/success-rate-pitfalls.md +162 -0
- package/skills/opencli-adapter-author/references/typed-errors.md +234 -0
- package/skills/opencli-autofix/SKILL.md +297 -0
- package/skills/opencli-browser/SKILL.md +468 -0
- package/skills/opencli-browser-sitemap/SKILL.md +96 -0
- package/skills/opencli-sitemap-author/SKILL.md +161 -0
- package/skills/opencli-sitemap-author/references/sitemap-schema.md +660 -0
- package/skills/opencli-usage/SKILL.md +168 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import{cli as e,Strategy as a}from"@jackwener/opencli/registry";e({site:"xiaoe",name:"play-url",access:"read",description:"小鹅通视频/音频/直播回放 M3U8 播放地址",domain:"h5.xet.citv.cn",strategy:a.COOKIE,args:[{name:"url",required:!0,positional:!0,help:"小节页面 URL"}],columns:["title","resource_id","m3u8_url","duration_sec","method"],pipeline:[{navigate:"${{ args.url }}"},{wait:2},{evaluate:`(async () => {
|
|
2
|
+
var pageUrl = window.location.href;
|
|
3
|
+
var origin = window.location.origin;
|
|
4
|
+
var resourceId = (pageUrl.match(/[val]_[a-f0-9]+/) || [])[0] || '';
|
|
5
|
+
var productId = (pageUrl.match(/product_id=([^&]+)/) || [])[1] || '';
|
|
6
|
+
var appId = (origin.match(/(app[a-z0-9]+)\\./) || [])[1] || '';
|
|
7
|
+
var isLive = resourceId.startsWith('l_') || pageUrl.includes('/alive/');
|
|
8
|
+
var m3u8Url = '', method = '', title = document.title, duration = 0;
|
|
9
|
+
|
|
10
|
+
// 深度搜索 Vue 组件树找 M3U8
|
|
11
|
+
function searchVueM3u8() {
|
|
12
|
+
var el = document.querySelector('#app');
|
|
13
|
+
if (!el || !el.__vue__) return '';
|
|
14
|
+
var walk = function(vm, d) {
|
|
15
|
+
if (!vm || d > 10) return '';
|
|
16
|
+
var data = vm.$data || {};
|
|
17
|
+
for (var k in data) {
|
|
18
|
+
if (k[0] === '_' || k[0] === '$') continue;
|
|
19
|
+
var v = data[k];
|
|
20
|
+
if (typeof v === 'string' && v.includes('.m3u8')) return v;
|
|
21
|
+
if (typeof v === 'object' && v) {
|
|
22
|
+
try {
|
|
23
|
+
var s = JSON.stringify(v);
|
|
24
|
+
var m = s.match(/https?:[^"]*\\.m3u8[^"]*/);
|
|
25
|
+
if (m) return m[0].replace(/\\\\\\//g, '/');
|
|
26
|
+
} catch(e) {}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (vm.$children) {
|
|
30
|
+
for (var c = 0; c < vm.$children.length; c++) {
|
|
31
|
+
var f = walk(vm.$children[c], d + 1);
|
|
32
|
+
if (f) return f;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return '';
|
|
36
|
+
};
|
|
37
|
+
return walk(el.__vue__, 0);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// ===== 视频课: detail_info → getPlayUrl =====
|
|
41
|
+
if (!isLive && resourceId.startsWith('v_')) {
|
|
42
|
+
try {
|
|
43
|
+
var detailRes = await fetch(origin + '/xe.course.business.video.detail_info.get/2.0.0', {
|
|
44
|
+
method: 'POST', credentials: 'include',
|
|
45
|
+
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
46
|
+
body: new URLSearchParams({
|
|
47
|
+
'bizData[resource_id]': resourceId,
|
|
48
|
+
'bizData[product_id]': productId || resourceId,
|
|
49
|
+
'bizData[opr_sys]': 'MacIntel',
|
|
50
|
+
}),
|
|
51
|
+
});
|
|
52
|
+
var detail = await detailRes.json();
|
|
53
|
+
var vi = (detail.data || {}).video_info || {};
|
|
54
|
+
title = vi.file_name || title;
|
|
55
|
+
duration = vi.video_length || 0;
|
|
56
|
+
if (vi.play_sign) {
|
|
57
|
+
var userId = (document.cookie.match(/ctx_user_id=([^;]+)/) || [])[1] || window.__user_id || '';
|
|
58
|
+
var playRes = await fetch(origin + '/xe.material-center.play/getPlayUrl', {
|
|
59
|
+
method: 'POST', credentials: 'include',
|
|
60
|
+
headers: { 'Content-Type': 'application/json' },
|
|
61
|
+
body: JSON.stringify({
|
|
62
|
+
org_app_id: appId, app_id: vi.material_app_id || appId,
|
|
63
|
+
user_id: userId, play_sign: [vi.play_sign],
|
|
64
|
+
play_line: 'A', opr_sys: 'MacIntel',
|
|
65
|
+
}),
|
|
66
|
+
});
|
|
67
|
+
var playData = await playRes.json();
|
|
68
|
+
if (playData.code === 0 && playData.data) {
|
|
69
|
+
var m = JSON.stringify(playData.data).match(/https?:[^"]*\\.m3u8[^"]*/);
|
|
70
|
+
if (m) { m3u8Url = m[0].replace(/\\\\u0026/g, '&').replace(/\\\\\\//g, '/'); method = 'api_direct'; }
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
} catch(e) {}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// ===== 兜底: Performance API + Vue 搜索轮询 =====
|
|
77
|
+
if (!m3u8Url) {
|
|
78
|
+
for (var attempt = 0; attempt < 30; attempt++) {
|
|
79
|
+
var entries = performance.getEntriesByType('resource');
|
|
80
|
+
for (var i = 0; i < entries.length; i++) {
|
|
81
|
+
if (entries[i].name.includes('.m3u8')) { m3u8Url = entries[i].name; method = 'perf_api'; break; }
|
|
82
|
+
}
|
|
83
|
+
if (!m3u8Url) { m3u8Url = searchVueM3u8(); if (m3u8Url) method = 'vue_search'; }
|
|
84
|
+
if (m3u8Url) break;
|
|
85
|
+
await new Promise(function(r) { setTimeout(r, 500); });
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (!duration) {
|
|
90
|
+
var vid = document.querySelector('video'), aud = document.querySelector('audio');
|
|
91
|
+
if (vid && vid.duration && !isNaN(vid.duration)) duration = Math.round(vid.duration);
|
|
92
|
+
if (aud && aud.duration && !isNaN(aud.duration)) duration = Math.round(aud.duration);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return [{ title: title, resource_id: resourceId, m3u8_url: m3u8Url, duration_sec: duration, method: method }];
|
|
96
|
+
})()
|
|
97
|
+
`},{map:{title:"${{ item.title }}",resource_id:"${{ item.resource_id }}",m3u8_url:"${{ item.m3u8_url }}",duration_sec:"${{ item.duration_sec }}",method:"${{ item.method }}"}}]});
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import{cli as y,Strategy as x}from"@jackwener/opencli/registry";import{ArgumentError as d,AuthRequiredError as b,CommandExecutionError as c,TimeoutError as S}from"@jackwener/opencli/errors";const u="www.xiaohongshu.com",I=["query","answer","source_count","source_total_text","sources_summary","sources","warning","message_id","conversation_id"];export function unwrapEvaluateResult(e){if(e&&!Array.isArray(e)&&typeof e==="object"&&"session"in e&&"data"in e)return e.data;return e}function w(e,t,n,r,i){const o=e??t;let s;if(typeof o==="number")s=o;else if(typeof o==="string"&&/^\d+$/.test(o))s=Number(o);else throw new d(`${i} must be an integer between ${n} and ${r}, got ${JSON.stringify(e)}`);if(!Number.isInteger(s)||s<n||s>r)throw new d(`${i} must be an integer between ${n} and ${r}, got ${JSON.stringify(e)}`);return s}export function parseAskTimeout(e){return w(e,90,1,180,"--timeout")}export function parseAskLimit(e){return w(e,10,1,50,"--source-limit")}function m(e){return String(e??"").replace(/<[^>]+>/g,"").replace(/\u200b/g,"").replace(/\r\n/g,`
|
|
2
|
+
`).trim()}function a(e){return m(e).replace(/\s+/g," ").trim()}function f(...e){for(const t of e){const n=a(t);if(n)return n}return""}function $(e){if(e===null||e===void 0||e==="")return null;const t=(o)=>Number.isSafeInteger(o)&&o>=0?o:null;if(typeof e==="number")return t(e);const n=String(e).trim(),r=n.match(/^(\d+(?:\.\d+)?)\s*(万|[wW]|亿)\+?$/);if(r){const o=Number(r[1]),s=r[2]==="亿"?1e8:1e4;return Number.isFinite(o)?t(Math.round(o*s)):null}const i=n.replace(/,/g,"").replace(/\+$/,"");if(/^\d+$/.test(i)&&(n===i||n===`${i}+`||/^\d{1,3}(?:,\d{3})+\+?$/.test(n)))return t(Number(i));return null}function g(e){if(!e)return null;try{return new URL(String(e))}catch{return null}}function _(e){const t=String(e||"").trim();if(!t)return null;const n=t.match(/^xhsdiscover:\/\/item\/([0-9a-f]{24})(?=[?#/]|$)/i);if(n){const s=g(t);return{noteId:n[1],xsecToken:s?.searchParams.get("xsec_token")||s?.searchParams.get("xsecToken")||"",href:t}}let r=g(t);if(!r&&t.startsWith("/"))r=g(`https://${u}${t}`);const i=r?.hostname.toLowerCase();if(!r||r.protocol!=="https:"||i!==u&&i!=="xiaohongshu.com")return null;const o=r.pathname.match(/^\/(?:explore|search_result|note)\/([0-9a-f]{24})\/?$/i);if(!o)return null;return{noteId:o[1],xsecToken:r.searchParams.get("xsec_token")||r.searchParams.get("xsecToken")||"",href:r.toString()}}function v(e){const t=a(e?.id||e?.noteId||e?.note_id);if(/^[0-9a-f]{24}$/i.test(t))return t;const n=[e?.textLink,e?.link,e?.url];for(const r of n){const i=_(r);if(i?.noteId)return i.noteId}return""}export function buildNoteUrl(e,t){if(!/^[0-9a-f]{24}$/i.test(String(e||"")))return"";const n=new URL(`https://${u}/explore/${e}`);if(t){n.searchParams.set("xsec_token",t);n.searchParams.set("xsec_source","")}return n.toString()}function A(e){const t=m(e?.content);if(!t)return"";const n=Array.isArray(e?.originLocation)?e.originLocation:[],r=Number(n[0]),i=Number(n[1]);if(Number.isInteger(r)&&r>=0&&Number.isInteger(i)&&i>0)return a(t.slice(r,r+i)).slice(0,300);return a(t).slice(0,300)}export function normalizeAskSource(e,t){const n=[e?.textLink,e?.link,e?.url].map(_).find(Boolean),r=v(e),i=n?.xsecToken||"",o={rank:t+1,type:"note",title:f(e?.title,e?.displayTitle,e?.name),url:buildNoteUrl(r,i),note_id:r,xsec_token:i,author:f(e?.nickName,e?.nickname,e?.author,e?.userName)},s=f(e?.noteType);if(s)o.note_type=s;const l=$(e?.like);if(l!==null)o.like_count=l;const p=a(e?.userId);if(p)o.user_id=p;const h=a(e?.time);if(h)o.published_at=h;const k=A(e);if(k)o.quote=k;if(n?.href)o.deeplink=n.href;return o}function q(e){return e.slice(0,5).map((t)=>`${t.rank}. ${t.title||t.note_id}${t.author?` - ${t.author}`:""}`).join(`
|
|
3
|
+
`)}export function buildAskResult(e){const n=(Array.isArray(e?.sources)?e.sources:[]).map((s,l)=>normalizeAskSource(s,l)).filter((s)=>s.note_id||s.title||s.url),r=m(e?.answer||e?.base_info?.text||""),i=a(e?.warning),o=n.length===0&&r?`Xiaohongshu 点点 returned an answer but no citation sources.${i?` ${i}`:""}`:i;return{query:a(e?.query),answer:r,source_count:n.length,source_total_text:a(e?.source_total_text),sources_summary:q(n),sources:n,warning:o,message_id:a(e?.message_id),conversation_id:a(e?.conversation_id)}}export function buildAskEvaluateJs(e,t,n){const r=String(e);return`
|
|
4
|
+
(async () => {
|
|
5
|
+
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
6
|
+
const timeoutMs = ${Number(t)} * 1000;
|
|
7
|
+
const sourceLimit = ${Number(n)};
|
|
8
|
+
const requestSourceSize = Math.max(sourceLimit, 10);
|
|
9
|
+
const prompt = ${JSON.stringify(r)};
|
|
10
|
+
const simplifyText = (value, max = 6000) => {
|
|
11
|
+
const text = String(value || '');
|
|
12
|
+
return text.length > max ? text.slice(0, max) : text;
|
|
13
|
+
};
|
|
14
|
+
const latestRound = (store, scenes, msgId) => {
|
|
15
|
+
const rounds = typeof store.getSceneRounds === 'function'
|
|
16
|
+
? store.getSceneRounds(scenes.AiChat)
|
|
17
|
+
: (Array.isArray(store.rounds) ? store.rounds : []);
|
|
18
|
+
return [...rounds].reverse().find((round) => round?.aiMessage?.msgId === msgId) || null;
|
|
19
|
+
};
|
|
20
|
+
const slimSource = (item) => ({
|
|
21
|
+
id: item?.id || item?.noteId || item?.note_id || '',
|
|
22
|
+
title: item?.title || item?.displayTitle || '',
|
|
23
|
+
type: item?.type || '',
|
|
24
|
+
noteType: item?.noteType || '',
|
|
25
|
+
userId: item?.userId || '',
|
|
26
|
+
nickName: item?.nickName || item?.nickname || '',
|
|
27
|
+
content: simplifyText(item?.content || '', 2000),
|
|
28
|
+
originLocation: item?.originLocation || null,
|
|
29
|
+
textLink: item?.textLink || '',
|
|
30
|
+
link: item?.link || item?.imageList?.[0]?.link || '',
|
|
31
|
+
url: item?.url || '',
|
|
32
|
+
like: item?.like ?? null,
|
|
33
|
+
time: item?.time || '',
|
|
34
|
+
});
|
|
35
|
+
try {
|
|
36
|
+
if (!window.webpackChunkxhs_pc_web) {
|
|
37
|
+
return { ok: false, error: 'webpack_runtime_missing', page_url: location.href };
|
|
38
|
+
}
|
|
39
|
+
let webpackRequire;
|
|
40
|
+
window.webpackChunkxhs_pc_web.push([[Date.now()], {}, (req) => { webpackRequire = req; }]);
|
|
41
|
+
if (!webpackRequire) return { ok: false, error: 'webpack_require_unavailable', page_url: location.href };
|
|
42
|
+
const mod = webpackRequire(6404);
|
|
43
|
+
const useConversationStore = mod?.t;
|
|
44
|
+
const scenes = mod?.G || { AiChat: 'aiChat' };
|
|
45
|
+
if (typeof useConversationStore !== 'function') {
|
|
46
|
+
return { ok: false, error: 'conversation_store_missing', page_url: location.href };
|
|
47
|
+
}
|
|
48
|
+
const store = useConversationStore();
|
|
49
|
+
if (typeof store.sendMessage !== 'function' || typeof store.createConversation !== 'function') {
|
|
50
|
+
return { ok: false, error: 'conversation_api_missing', page_url: location.href };
|
|
51
|
+
}
|
|
52
|
+
if (typeof store.switchScene === 'function') store.switchScene(scenes.AiChat);
|
|
53
|
+
if (typeof store.clearConversation === 'function') {
|
|
54
|
+
await Promise.resolve(store.clearConversation(scenes.AiChat));
|
|
55
|
+
}
|
|
56
|
+
const conversationId = crypto.randomUUID();
|
|
57
|
+
store.createConversation(conversationId, scenes.AiChat);
|
|
58
|
+
const msgId = await store.sendMessage(conversationId, prompt, {
|
|
59
|
+
skipImmediateUI: true,
|
|
60
|
+
skipHistory: true,
|
|
61
|
+
visible: false,
|
|
62
|
+
});
|
|
63
|
+
if (!msgId) {
|
|
64
|
+
return { ok: false, error: 'send_message_failed', page_url: location.href };
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const deadline = Date.now() + timeoutMs;
|
|
68
|
+
let round = null;
|
|
69
|
+
let finished = false;
|
|
70
|
+
while (Date.now() < deadline) {
|
|
71
|
+
await sleep(1000);
|
|
72
|
+
round = latestRound(store, scenes, msgId);
|
|
73
|
+
const answer = round?.aiMessage?.text || '';
|
|
74
|
+
if (round?.aiMessage?.isFinished && answer) {
|
|
75
|
+
finished = true;
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
round = round || latestRound(store, scenes, msgId);
|
|
80
|
+
const aiMessage = round?.aiMessage || {};
|
|
81
|
+
const answer = aiMessage.text || (Array.isArray(aiMessage.dataFragments)
|
|
82
|
+
? aiMessage.dataFragments.map((fragment) => fragment?.text || '').join('')
|
|
83
|
+
: '');
|
|
84
|
+
if (!finished || !answer) {
|
|
85
|
+
return { ok: false, error: 'answer_timeout', timeout_seconds: ${Number(t)}, message_id: msgId, conversation_id: conversationId };
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
let detail = null;
|
|
89
|
+
let sourceError = '';
|
|
90
|
+
try {
|
|
91
|
+
if (store.agent?.getResponseReferences) {
|
|
92
|
+
for (let attempt = 0; attempt < 5; attempt++) {
|
|
93
|
+
detail = await store.agent.getResponseReferences({
|
|
94
|
+
query: prompt,
|
|
95
|
+
message_id: msgId,
|
|
96
|
+
page: 0,
|
|
97
|
+
size: requestSourceSize,
|
|
98
|
+
version: 0,
|
|
99
|
+
result_version: 0,
|
|
100
|
+
id: '',
|
|
101
|
+
});
|
|
102
|
+
if (Array.isArray(detail?.items) && detail.items.length > 0) break;
|
|
103
|
+
await sleep(1000);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
} catch (err) {
|
|
107
|
+
sourceError = String(err?.message || err || '');
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const rawSources = Array.isArray(detail?.items) ? detail.items.slice(0, sourceLimit).map(slimSource) : [];
|
|
111
|
+
return {
|
|
112
|
+
ok: true,
|
|
113
|
+
query: prompt,
|
|
114
|
+
answer,
|
|
115
|
+
source_total_text: detail?.baseInfo?.totalCnt || aiMessage?.querySource?.text || aiMessage?.querySource?.oneboxText || '',
|
|
116
|
+
sources: rawSources,
|
|
117
|
+
warning: sourceError,
|
|
118
|
+
message_id: msgId,
|
|
119
|
+
conversation_id: conversationId,
|
|
120
|
+
};
|
|
121
|
+
} catch (err) {
|
|
122
|
+
return {
|
|
123
|
+
ok: false,
|
|
124
|
+
error: String(err?.message || err || 'unknown_error'),
|
|
125
|
+
stack: String(err?.stack || '').slice(0, 1500),
|
|
126
|
+
page_url: location.href,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
})()
|
|
130
|
+
`}function C(e){const t=String(e||"").trim();if(!t)throw new d("query is required");return t}function N(e,t){const n=a(e?.error);if(n==="answer_timeout")throw new S("xiaohongshu ask",t,"点点没有在超时时间内返回答案;可以重试或提高 --timeout。");if(n==="send_message_failed")throw new b(u,"Xiaohongshu 点点 did not accept the query. Check login status for www.xiaohongshu.com.");throw new c(`xiaohongshu ask failed: ${n||"unknown error"}`,e?.page_url?`Page URL: ${e.page_url}`:void 0)}function T(e){if(!e||typeof e!=="object")throw new c("xiaohongshu ask returned a malformed page payload");if(!m(e.answer||e.base_info?.text||""))throw new c("xiaohongshu ask returned a malformed page payload: missing answer");if(!a(e.message_id)||!a(e.conversation_id))throw new c("xiaohongshu ask returned a malformed page payload: missing message identity")}export const command=y({site:"xiaohongshu",name:"ask",access:"write",description:"Ask 小红书点点 and return the answer with citation sources.",domain:u,strategy:x.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"query",positional:!0,required:!0,help:"Question for 点点"},{name:"timeout",type:"int",default:90,help:"Seconds to wait for the 点点 answer"},{name:"source-limit",type:"int",default:10,help:"Maximum citation sources to return"}],columns:I,func:async(e,t)=>{const n=C(t?.query),r=parseAskTimeout(t?.timeout),i=parseAskLimit(t?.["source-limit"]),o=encodeURIComponent(n);await e.goto(`https://${u}/search_result?keyword=${o}&source=web_search_result_notes`);await e.wait?.(1);const s=unwrapEvaluateResult(await e.evaluate(buildAskEvaluateJs(n,r,i)));if(!s||typeof s!=="object")throw new c("xiaohongshu ask returned a malformed page payload");if(s.ok===!1)N(s,r);T(s);return buildAskResult(s)}});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{AuthRequiredError as n,CommandExecutionError as l}from"@jackwener/opencli/errors";import{registerSiteAuthCommands as m}from"../_shared/site-auth.js";async function i(o){const e=await o.getCookies({url:"https://creator.xiaohongshu.com"});return new Set(e.filter((r)=>r.value).map((r)=>r.name)).has("web_session")}async function c(o){await o.goto("https://creator.xiaohongshu.com/new/home");const e=await o.evaluate(`
|
|
2
|
+
async () => {
|
|
3
|
+
try {
|
|
4
|
+
const resp = await fetch('/api/galaxy/creator/home/personal_info', { credentials: 'include' });
|
|
5
|
+
const text = await resp.text();
|
|
6
|
+
let parsed = null;
|
|
7
|
+
try { parsed = JSON.parse(text); } catch {}
|
|
8
|
+
return [resp.ok, resp.status, parsed, text.slice(0, 200)];
|
|
9
|
+
} catch (error) {
|
|
10
|
+
return [false, 0, null, String(error && error.message || error)];
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
`),[a,r,s,h]=Array.isArray(e)?e:[];if(!a){const u=s?.msg??h??`HTTP ${r??""}`;throw new n("creator.xiaohongshu.com",`Xiaohongshu creator profile requires login: ${u}`)}const t=s?.data;if(!t)throw new l("Xiaohongshu creator profile returned malformed personal_info payload");return{username:t.name??"",followers:t.fans_count??0}}m({site:"xiaohongshu",domain:"creator.xiaohongshu.com",loginUrl:"https://creator.xiaohongshu.com/",columns:["username","followers"],quickCheck:i,verify:c,poll:async(o)=>{if(!await i(o))throw new n("creator.xiaohongshu.com","Waiting for Xiaohongshu session cookies");return c(o)}});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import{ArgumentError as m,AuthRequiredError as w,CommandExecutionError as u,EmptyResultError as g}from"@jackwener/opencli/errors";import{buildXhsNoteUrl as _,normalizeXhsUserId as I}from"./user-helpers.js";export const COLLECT_API_PATTERN="note/collect/page",LIKE_API_PATTERN="note/like/page",SAVED_PROFILE_TAB="fav",LIKED_PROFILE_TAB="liked";export function buildProfileCollectionUrl(e,o){const t=a(e),n=a(o),r=new URL(`https://www.xiaohongshu.com/user/profile/${t}`);r.searchParams.set("tab",n);r.searchParams.set("subTab","note");return r.toString()}function a(e){return typeof e==="string"?e.trim():e==null?"":String(e).trim()}function f(e){return e&&typeof e==="object"&&!Array.isArray(e)}export function unwrapBrowserResult(e){if(f(e)&&"session"in e&&"data"in e)return e.data;return e}export function parseCollectionLimit(e){const o=Number(e??20);if(!Number.isFinite(o)||!Number.isInteger(o))throw new m(`--limit must be an integer between 1 and 100, got ${JSON.stringify(e)}`);if(o<1||o>100)throw new m(`--limit must be between 1 and 100, got ${o}`);return o}export function readSelfUserIdFromState(e){const t=unwrapBrowserResult(e)?.user?.userInfo,n=t?._value??t??{};return a(n.user_id??n.userId??n.userID??"")}export function mapCollectionNote(e,o={}){if(!f(e))return null;const t=e.note_card??e.noteCard??e,n=a(e.note_id??e.noteId??e.id??t.note_id??t.noteId??t.id);if(!n)return null;const r=t.user??e.user??{},c=a(r.user_id??r.userId??""),l=a(e.xsec_token??e.xsecToken??t.xsec_token??t.xsecToken);if(!l)return null;const s=t.interact_info??t.interactInfo??e.interact_info??e.interactInfo??{},h=c?_(c,n,l):`https://www.xiaohongshu.com/explore/${encodeURIComponent(n)}?xsec_token=${encodeURIComponent(l)}&xsec_source=pc_user`;return{id:n,title:a(t.display_title??t.displayTitle??t.title??e.title??e.display_title),author:a(r.nickname??r.nick_name??r.name),likes:a(s.liked_count??s.likedCount??0)||"0",type:a(t.type??e.type),url:h}}export function extractNotesFromResponses(e,o){const t=[],n=new Set;for(const r of e??[]){const c=unwrapBrowserResult(r);if(!f(c))throw new u("xiaohongshu collection API returned a malformed payload");const l=c.data;if(!f(l))throw new u("xiaohongshu collection API returned malformed data");const s=l.notes??l.note_list;if(!Array.isArray(s))throw new u("xiaohongshu collection API returned malformed notes");for(const h of s){const i=mapCollectionNote(h,{fallbackUserId:o});if(!i?.id||!i.url.includes("xsec_token="))throw new u("xiaohongshu collection API returned a note without stable id/xsec token");if(n.has(i.id))continue;n.add(i.id);t.push(i)}}return t}export const EXTRACT_COLLECTION_DOM_JS=`
|
|
2
|
+
(() => {
|
|
3
|
+
const normalizeUrl = (href) => {
|
|
4
|
+
if (!href) return '';
|
|
5
|
+
let url;
|
|
6
|
+
try {
|
|
7
|
+
url = new URL(href, 'https://www.xiaohongshu.com');
|
|
8
|
+
} catch {
|
|
9
|
+
return '';
|
|
10
|
+
}
|
|
11
|
+
if (url.protocol !== 'https:' || url.hostname !== 'www.xiaohongshu.com') return '';
|
|
12
|
+
if (!url.searchParams.get('xsec_token')) return '';
|
|
13
|
+
return url.toString();
|
|
14
|
+
};
|
|
15
|
+
const cleanText = (value) => (value || '').replace(/\\s+/g, ' ').trim();
|
|
16
|
+
const results = [];
|
|
17
|
+
const seen = new Set();
|
|
18
|
+
document.querySelectorAll('section.note-item').forEach((el) => {
|
|
19
|
+
if (el.classList.contains('query-note-item')) return;
|
|
20
|
+
const titleEl = el.querySelector('.title, .note-title, a.title, .footer .title span');
|
|
21
|
+
const nameEl = el.querySelector('a.author .name, .author-name, .nick-name, .name');
|
|
22
|
+
const likesEl = el.querySelector('.count, .like-count, .like-wrapper .count');
|
|
23
|
+
const detailLinkEl =
|
|
24
|
+
el.querySelector('a.cover.mask') ||
|
|
25
|
+
el.querySelector('a[href*="/search_result/"]') ||
|
|
26
|
+
el.querySelector('a[href*="/explore/"]') ||
|
|
27
|
+
el.querySelector('a[href*="/note/"]') ||
|
|
28
|
+
el.querySelector('a[href*="/user/profile/"]');
|
|
29
|
+
const url = normalizeUrl(detailLinkEl?.getAttribute('href') || '');
|
|
30
|
+
if (!url) return;
|
|
31
|
+
const noteIdMatch = url.match(/\\/(?:search_result|explore|note)\\/([0-9a-f]{24})|\\/user\\/profile\\/[^/]+\\/([0-9a-f]{24})/i);
|
|
32
|
+
const id = noteIdMatch?.[1] || noteIdMatch?.[2] || '';
|
|
33
|
+
if (!id || seen.has(id)) return;
|
|
34
|
+
seen.add(id);
|
|
35
|
+
results.push({
|
|
36
|
+
id,
|
|
37
|
+
title: cleanText(titleEl?.textContent || ''),
|
|
38
|
+
author: cleanText(nameEl?.textContent || ''),
|
|
39
|
+
likes: cleanText(likesEl?.textContent || '0'),
|
|
40
|
+
type: '',
|
|
41
|
+
url,
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
return results;
|
|
45
|
+
})()
|
|
46
|
+
`;const y=`
|
|
47
|
+
(() => {
|
|
48
|
+
const pathName = (typeof location !== 'undefined' && location.pathname) ? location.pathname : '';
|
|
49
|
+
const userStore = window.__INITIAL_STATE__?.user;
|
|
50
|
+
const loggedInVal = userStore ? (userStore.loggedIn?._value ?? userStore.loggedIn) : undefined;
|
|
51
|
+
const bodyText = document.body?.innerText || '';
|
|
52
|
+
return Boolean(pathName.indexOf('/login') === 0 || loggedInVal === false || /登录后|请先登录|登录后查看/.test(bodyText));
|
|
53
|
+
})()
|
|
54
|
+
`,A=`
|
|
55
|
+
(() => ({
|
|
56
|
+
href: location.href,
|
|
57
|
+
hostname: location.hostname,
|
|
58
|
+
pathname: location.pathname,
|
|
59
|
+
}))()
|
|
60
|
+
`;async function p(e){if(unwrapBrowserResult(await e.evaluate(y))===!0)throw new w("www.xiaohongshu.com","Xiaohongshu collection page requires login; re-login to xiaohongshu.com and retry.")}export async function assertOnCollectionProfile(e,o){await p(e);const t=unwrapBrowserResult(await e.evaluate(A));if(!f(t))throw new u("xiaohongshu collection page returned malformed location");const n=a(t.hostname).toLowerCase(),r=a(t.pathname);if(n==="www.xiaohongshu.com"&&r==="/login")throw new w("xiaohongshu collection page requires login");const c=`/user/profile/${a(o)}`;if(n!=="www.xiaohongshu.com"||r!==c)throw new u(`xiaohongshu collection landed on unexpected page: ${a(t.href)||`${n}${r}`}`)}async function x(e,o,t){const n=await e.getInterceptedRequests();if(!Array.isArray(n))throw new u("xiaohongshu collection interceptor returned malformed captures");if(Array.isArray(n)&&n.length>0)o.push(...n);return extractNotesFromResponses(o,t)}export async function resolveXhsUserId(e,o){if(o)return I(String(o));await e.goto("https://www.xiaohongshu.com/explore");await e.wait(2);await p(e);const t=unwrapBrowserResult(await e.evaluate(`() => {
|
|
61
|
+
const user = window.__INITIAL_STATE__?.user?.userInfo;
|
|
62
|
+
const info = user?._value ?? user ?? {};
|
|
63
|
+
return info.user_id || info.userId || info.userID || '';
|
|
64
|
+
}`)),n=a(t);if(!n)throw new w("www.xiaohongshu.com","Not logged into Xiaohongshu (could not resolve current user id)");return n}export async function extractNotesFromDom(e){const o=unwrapBrowserResult(await e.evaluate(EXTRACT_COLLECTION_DOM_JS));if(!Array.isArray(o))throw new u("xiaohongshu collection DOM extraction returned malformed rows");return o.filter((t)=>t?.id)}export async function fetchXhsCollectionNotes(e,{userId:o,profileTab:t,apiPattern:n,limit:r,emptyLabel:c}){const l=[];await e.installInterceptor(n);await e.goto(buildProfileCollectionUrl(o,t));await e.wait(2);await assertOnCollectionProfile(e,o);let s=[];for(let i=0;i<16;i++){await e.wait(0.5);s=await x(e,l,o);if(s.length>0)break}let h=s.length;for(let i=0;s.length<r&&i<4;i+=1){await e.autoScroll({times:1,delayMs:1500});await e.wait(1);await assertOnCollectionProfile(e,o);const d=await x(e,l,o);if(d.length>h){s=d;h=d.length;continue}break}if(s.length===0){const i=await extractNotesFromDom(e);if(i.length>0)s=i}if(s.length===0)throw new g("xiaohongshu collection",`No ${c} notes found. Ensure you are logged in and this profile tab is visible.`);return s.slice(0,r).map((i,d)=>({rank:d+1,...i}))}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import{cli as A,Strategy as J}from"@jackwener/opencli/registry";import{AuthRequiredError as W,CliError as F,EmptyResultError as N}from"@jackwener/opencli/errors";import{parseNoteId as O,buildNoteUrl as U}from"./note-helpers.js";const j='.author-wrapper a[href*="/user/profile/"], a.name[href*="/user/profile/"], a.user-name[href*="/user/profile/"], a[href*="/user/profile/"]';export function parseXhsProfileHref(z,B="www.xiaohongshu.com"){const D=typeof z==="string"?z.trim():"";if(!D)return"";const M=String(B||"www.xiaohongshu.com").toLowerCase();let K;try{K=new URL(D,`https://${M}`)}catch{return""}if(K.protocol!=="https:")return"";if(K.hostname.toLowerCase()!==M)return"";return K.pathname.match(/^\/user\/profile\/([a-zA-Z0-9]+)\/?$/)?.[1]??""}export function buildXhsProfileUrl(z,B="www.xiaohongshu.com"){const D=parseXhsProfileHref(z,B);if(!D)return"";return`https://${B}/user/profile/${D}`}export function parseCommentLimit(z,B=20){const D=Number(z);if(!Number.isFinite(D))return B;return Math.max(1,Math.min(Math.floor(D),50))}export function parseXhsLikeCountText(z){const B=/^(?:\d+|\d{1,3}(?:[,,]\d{3})+)\+?$/u,D=/^((?:\d+|\d{1,3}(?:[,,]\d{3})+)(?:\.\d+)?)([wWkK万千])\+?$/u,M=String(z??"").replace(/\s+/g,"");if(!M)return 0;if(B.test(M))return Number(M.replace(/[,+,]/g,""));const K=M.match(D);if(!K)return 0;const V=Number(K[1].replace(/[,,]/g,""));if(!Number.isFinite(V))return 0;const Q=K[2].toLowerCase();return Math.round(V*(Q==="w"||Q==="万"?1e4:1000))}export function buildCommentsExtractJs(z){const B=parseXhsLikeCountText.toString();return`
|
|
2
|
+
(async () => {
|
|
3
|
+
const wait = (ms) => new Promise(r => setTimeout(r, ms))
|
|
4
|
+
const withReplies = ${z}
|
|
5
|
+
|
|
6
|
+
// Check login state
|
|
7
|
+
const bodyText = document.body?.innerText || ''
|
|
8
|
+
const loginWall = /登录后查看|请登录/.test(bodyText)
|
|
9
|
+
const securityBlock = /安全限制|访问链接异常/.test(bodyText)
|
|
10
|
+
|| /website-login\\/error|error_code=300017|error_code=300031/.test(location.href)
|
|
11
|
+
|
|
12
|
+
// Scroll the note container to trigger comment loading
|
|
13
|
+
const scroller = document.querySelector('.note-scroller') || document.querySelector('.container')
|
|
14
|
+
if (scroller) {
|
|
15
|
+
for (let i = 0; i < 3; i++) {
|
|
16
|
+
const beforeCount = scroller.querySelectorAll('.parent-comment').length
|
|
17
|
+
scroller.scrollTo(0, scroller.scrollHeight)
|
|
18
|
+
await wait(800 + Math.random() * 1200)
|
|
19
|
+
const afterCount = scroller.querySelectorAll('.parent-comment').length
|
|
20
|
+
if (afterCount <= beforeCount) break
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const clean = (el) => (el?.textContent || '').replace(/\\s+/g, ' ').trim()
|
|
25
|
+
const parseLikeCountText = ${B}
|
|
26
|
+
const parseLikes = (el) => {
|
|
27
|
+
return parseLikeCountText(clean(el))
|
|
28
|
+
}
|
|
29
|
+
const HREF_SELECTOR = ${JSON.stringify(j)}
|
|
30
|
+
const extractAuthorHref = (el) => {
|
|
31
|
+
if (!el) return ''
|
|
32
|
+
const anchor = el.querySelector(HREF_SELECTOR)
|
|
33
|
+
return anchor ? (anchor.getAttribute('href') || '') : ''
|
|
34
|
+
}
|
|
35
|
+
const expandReplyThreads = async (root) => {
|
|
36
|
+
if (!withReplies || !root) return
|
|
37
|
+
const clickedTexts = new Set()
|
|
38
|
+
for (let round = 0; round < 3; round++) {
|
|
39
|
+
const expanders = Array.from(root.querySelectorAll('button, [role="button"], span, div')).filter(el => {
|
|
40
|
+
if (!(el instanceof HTMLElement)) return false
|
|
41
|
+
const text = clean(el)
|
|
42
|
+
if (!text || text.length > 24) return false
|
|
43
|
+
if (!/(展开|更多回复|全部回复|查看.*回复|共\\d+条回复)/.test(text)) return false
|
|
44
|
+
if (clickedTexts.has(text)) return false
|
|
45
|
+
return true
|
|
46
|
+
})
|
|
47
|
+
if (!expanders.length) break
|
|
48
|
+
for (const el of expanders) {
|
|
49
|
+
const text = clean(el)
|
|
50
|
+
el.click()
|
|
51
|
+
clickedTexts.add(text)
|
|
52
|
+
await wait(200 + Math.random() * 300)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const results = []
|
|
58
|
+
const parents = document.querySelectorAll('.parent-comment')
|
|
59
|
+
for (const p of parents) {
|
|
60
|
+
const item = p.querySelector('.comment-item')
|
|
61
|
+
if (!item) continue
|
|
62
|
+
|
|
63
|
+
const author = clean(item.querySelector('.author-wrapper .name, .user-name'))
|
|
64
|
+
const authorHrefRaw = extractAuthorHref(item)
|
|
65
|
+
const text = clean(item.querySelector('.content, .note-text'))
|
|
66
|
+
const likes = parseLikes(item.querySelector('.count'))
|
|
67
|
+
const time = clean(item.querySelector('.date, .time'))
|
|
68
|
+
|
|
69
|
+
if (!text) continue
|
|
70
|
+
results.push({ author, authorHrefRaw, text, likes, time, is_reply: false, reply_to: '' })
|
|
71
|
+
|
|
72
|
+
// Extract nested replies (楼中楼)
|
|
73
|
+
if (withReplies) {
|
|
74
|
+
await expandReplyThreads(p)
|
|
75
|
+
p.querySelectorAll('.reply-container .comment-item-sub, .sub-comment-list .comment-item').forEach(sub => {
|
|
76
|
+
const sAuthor = clean(sub.querySelector('.name, .user-name'))
|
|
77
|
+
const sAuthorHrefRaw = extractAuthorHref(sub)
|
|
78
|
+
const sText = clean(sub.querySelector('.content, .note-text'))
|
|
79
|
+
const sLikes = parseLikes(sub.querySelector('.count'))
|
|
80
|
+
const sTime = clean(sub.querySelector('.date, .time'))
|
|
81
|
+
if (!sText) return
|
|
82
|
+
results.push({ author: sAuthor, authorHrefRaw: sAuthorHrefRaw, text: sText, likes: sLikes, time: sTime, is_reply: true, reply_to: author })
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return { pageUrl: location.href, securityBlock, loginWall, results }
|
|
88
|
+
})()
|
|
89
|
+
`}export const command=A({site:"xiaohongshu",name:"comments",access:"read",description:"获取小红书笔记评论(支持楼中楼子回复)",domain:"www.xiaohongshu.com",strategy:J.COOKIE,navigateBefore:!1,args:[{name:"note-id",required:!0,positional:!0,help:"Full Xiaohongshu note URL with xsec_token"},{name:"limit",type:"int",default:20,help:"Number of top-level comments (max 50)"},{name:"with-replies",type:"boolean",default:!1,help:"Include nested replies (楼中楼)"}],columns:["rank","author","userId","profileUrl","text","likes","time","is_reply","reply_to"],func:async(z,B)=>{const D=parseCommentLimit(B.limit),M=Boolean(B["with-replies"]),K=String(B["note-id"]),V=O(K);await z.goto(U(K,{commandName:"xiaohongshu comments"}));await z.wait({time:2+Math.random()*3});const Q=await z.evaluate(buildCommentsExtractJs(M));if(!Q||typeof Q!=="object")throw new N("xiaohongshu/comments","Unexpected evaluate response");if(Q.securityBlock)throw new F("SECURITY_BLOCK","Xiaohongshu security block: the note detail page was blocked by risk control.",/^https?:\/\//.test(K)?"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(Q.loginWall)throw new W("www.xiaohongshu.com","Note comments require login");const Z=Q.results??[],$=(G,Y)=>({rank:Y+1,author:G.author,userId:G.authorHrefRaw?parseXhsProfileHref(G.authorHrefRaw):"",profileUrl:G.authorHrefRaw?buildXhsProfileUrl(G.authorHrefRaw):"",text:G.text,likes:G.likes,time:G.time,is_reply:G.is_reply,reply_to:G.reply_to});if(M){const G=[];let Y=0;for(const q of Z){if(!q.is_reply)Y++;if(Y>D)break;G.push(q)}return G.map($)}return Z.slice(0,D).map($)}});
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import{cli as v,Strategy as C}from"@jackwener/opencli/registry";import{CommandExecutionError as H,EmptyResultError as S}from"@jackwener/opencli/errors";const G=/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/,V=[{label:"曝光数",section:"基础数据"},{label:"观看数",section:"基础数据"},{label:"封面点击率",section:"基础数据"},{label:"平均观看时长",section:"基础数据"},{label:"涨粉数",section:"基础数据"},{label:"点赞数",section:"互动数据"},{label:"评论数",section:"互动数据"},{label:"收藏数",section:"互动数据"},{label:"分享数",section:"互动数据"}],j=new Set(V.map((q)=>q.label)),L=new Set(V.map((q)=>q.section)),U=new Set(["切换笔记","笔记诊断","核心数据","观看来源","观众画像","提升建议","基础数据","互动数据","导出数据","实时","按小时","按天"]);function O(q){const z=q.indexOf("笔记数据详情");if(z<0)return"";for(let Q=z+1;Q<q.length;Q++){const K=q[Q];if(!K||K.startsWith("#")||G.test(K))continue;if(U.has(K))continue;return K}return""}function P(q,z){let Q="",K="";for(let Y=z+1;Y<q.length;Y++){const W=q[Y];if(!W)continue;if(j.has(W))break;if(U.has(W)||W.startsWith("数据更新至")||W.startsWith("部分数据统计中"))continue;if(!Q){Q=W;continue}if(!K&&W.startsWith("粉丝")){K=W;break}if(W==="0"||/^\d/.test(W)||W.endsWith("%")||W.endsWith("秒"))break}return{value:Q,extra:K}}function N(q){return q.match(/\b\d{4}-\d{2}-\d{2} \d{2}:\d{2}\b/)?.[0]??""}export function parseCreatorNoteDetailText(q,z){const Q=q.split(`
|
|
2
|
+
`).map((Z)=>Z.trim()).filter(Boolean),K=O(Q),Y=Q.find((Z)=>G.test(Z))??"",W=[{section:"笔记信息",metric:"note_id",value:z,extra:""},{section:"笔记信息",metric:"title",value:K,extra:""},{section:"笔记信息",metric:"published_at",value:Y,extra:""}];for(const Z of V){const $=Q.indexOf(Z.label);if($<0)continue;const{value:J,extra:k}=P(Q,$);W.push({section:Z.section,metric:Z.label,value:J,extra:k})}return W}export function parseCreatorNoteDetailDomData(q,z){if(!q)return[];const Q=typeof q.title==="string"?q.title.trim():"",K=typeof q.infoText==="string"?q.infoText:"",Y=Array.isArray(q.sections)?q.sections:[],W=[{section:"笔记信息",metric:"note_id",value:z,extra:""},{section:"笔记信息",metric:"title",value:Q,extra:""},{section:"笔记信息",metric:"published_at",value:N(K),extra:""}];for(const $ of Y){if(!L.has($.title))continue;for(const J of $.metrics){if(!j.has(J.label))continue;W.push({section:$.title,metric:J.label,value:J.value,extra:J.extra})}}return W.some(($)=>$.section!=="笔记信息"&&$.value)?W:[]}function h(q){return q==null?"":`${q}%`}function g(q,z){const Q=z?.audienceSource?.source??[];for(const K of Q){if(!K.title)continue;const Y=[];if(K.info?.imp_count!=null)Y.push(`曝光 ${K.info.imp_count}`);if(K.info?.view_count!=null)Y.push(`观看 ${K.info.view_count}`);if(K.info?.interaction_count!=null)Y.push(`互动 ${K.info.interaction_count}`);q.push({section:"观看来源",metric:K.title,value:h(K.value_with_double),extra:Y.join(" · ")})}return q}function X(q,z,Q){for(const K of Q??[]){if(!K.title)continue;q.push({section:"观众画像",metric:`${z}/${K.title}`,value:h(K.value),extra:""})}return q}export function appendAudienceRows(q,z){g(q,z);X(q,"性别",z?.audienceSourceDetail?.gender);X(q,"年龄",z?.audienceSourceDetail?.age);X(q,"城市",z?.audienceSourceDetail?.city);X(q,"兴趣",z?.audienceSourceDetail?.interest);return q}function A(q,z){if(!q)return"";const K=new Date(q+28800000),Y=(W)=>String(W).padStart(2,"0");if(z==="hour")return`${Y(K.getUTCMonth()+1)}-${Y(K.getUTCDate())} ${Y(K.getUTCHours())}:00`;return`${K.getUTCFullYear()}-${Y(K.getUTCMonth()+1)}-${Y(K.getUTCDate())}`}function D(q,z){if(!q?.length)return"";return q.map((Q)=>{const K=A(Q.date,z),Y=Q.count_with_double??Q.count;return K&&Y!=null?`${K}=${Y}`:""}).filter(Boolean).join(" | ")}const _=[{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(q,z){if(z?.audienceTrend?.no_data_tip_msg)q.push({section:"趋势说明",metric:"观众趋势",value:z.audienceTrend.no_data?"暂不可用":"可用",extra:z.audienceTrend.no_data_tip_msg});const Q=[{label:"按小时",granularity:"hour",data:z?.noteBase?.hour},{label:"按天",granularity:"day",data:z?.noteBase?.day}];for(const K of Q)for(const Y of _){const W=K.data?.[Y.key],Z=D(W,K.granularity);if(!Z)continue;q.push({section:"趋势数据",metric:`${K.label}/${Y.label}`,value:`${W.length} points`,extra:Z})}return q}const B=[{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"}],f=20,x=0.5;function I(q){if(!q)return null;try{const z=new URL(String(q),"https://creator.xiaohongshu.com");return B.find((Q)=>z.pathname===Q.suffix)??null}catch{return null}}function R(q,z){return Object.keys(q).find((Q)=>I(Q)?.suffix===z)}function F(q){return q!==null&&typeof q==="object"&&!Array.isArray(q)}function M(q,z,Q){if(z in q&&!Array.isArray(q[z]))throw new H(`xiaohongshu creator-note-detail: signed API ${Q} returned malformed ${z}`)}function b(q,z,Q){if(z in q&&!F(q[z]))throw new H(`xiaohongshu creator-note-detail: signed API ${Q} returned malformed ${z}`)}function T(q,z){const Q=z.suffix;if(!F(q))throw new H(`xiaohongshu creator-note-detail: signed API ${Q} returned a malformed payload`);if(z.key==="noteBase"){b(q,"hour",Q);b(q,"day",Q)}if(z.key==="audienceSource")M(q,"source",Q);if(z.key==="audienceSourceDetail")for(const K of["gender","age","city","interest"])M(q,K,Q);return q}function w(q,z){const Q=z.suffix;if(!q||typeof q!=="object")throw new H(`xiaohongshu creator-note-detail: malformed capture for ${Q}`);if(q.ok!==!0)throw new H(`xiaohongshu creator-note-detail: signed API ${Q} returned HTTP ${q.status??"non-2xx"}`);if(typeof q.body!=="string")throw new H(`xiaohongshu creator-note-detail: signed API ${Q} returned a non-text body`);try{const K=JSON.parse(q.body),Y=F(K)&&Object.hasOwn(K,"data")?K.data:K;return T(Y,z)}catch{throw new H(`xiaohongshu creator-note-detail: signed API ${Q} returned invalid JSON or payload shape`)}}async function m(q){await q.evaluate(`(() => {
|
|
3
|
+
const targetPaths = ${JSON.stringify(B.map((z)=>z.suffix))};
|
|
4
|
+
const shouldCapture = (url) => {
|
|
5
|
+
try {
|
|
6
|
+
return targetPaths.includes(new URL(String(url), window.location.origin).pathname);
|
|
7
|
+
} catch (_) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
// Reset the buffer every call so stale captures from a previous run on
|
|
12
|
+
// the same tab cannot leak into the current navigation's harvest.
|
|
13
|
+
window.__xhsCapture = {};
|
|
14
|
+
if (window.__xhsCaptureInstalled) return;
|
|
15
|
+
window.__xhsCaptureInstalled = true;
|
|
16
|
+
const origFetch = window.fetch;
|
|
17
|
+
window.fetch = async function(...args) {
|
|
18
|
+
const resp = await origFetch.apply(this, args);
|
|
19
|
+
try {
|
|
20
|
+
const url = typeof args[0] === 'string' ? args[0] : (args[0] && args[0].url) || '';
|
|
21
|
+
if (shouldCapture(url)) {
|
|
22
|
+
resp.clone().text().then((body) => {
|
|
23
|
+
try { window.__xhsCapture[url] = { status: resp.status, ok: resp.ok, body }; } catch (_) {}
|
|
24
|
+
}).catch(() => {});
|
|
25
|
+
}
|
|
26
|
+
} catch (_) {}
|
|
27
|
+
return resp;
|
|
28
|
+
};
|
|
29
|
+
const OrigXHR = window.XMLHttpRequest;
|
|
30
|
+
function HookedXHR() {
|
|
31
|
+
const xhr = new OrigXHR();
|
|
32
|
+
const origOpen = xhr.open;
|
|
33
|
+
let capturedUrl = '';
|
|
34
|
+
xhr.open = function(method, url, ...rest) {
|
|
35
|
+
capturedUrl = url;
|
|
36
|
+
return origOpen.call(this, method, url, ...rest);
|
|
37
|
+
};
|
|
38
|
+
xhr.addEventListener('load', () => {
|
|
39
|
+
try {
|
|
40
|
+
if (shouldCapture(capturedUrl)) {
|
|
41
|
+
window.__xhsCapture[capturedUrl] = { status: xhr.status, ok: xhr.status >= 200 && xhr.status < 300, body: xhr.responseText };
|
|
42
|
+
}
|
|
43
|
+
} catch (_) {}
|
|
44
|
+
});
|
|
45
|
+
return xhr;
|
|
46
|
+
}
|
|
47
|
+
HookedXHR.prototype = OrigXHR.prototype;
|
|
48
|
+
// Preserve readyState constants (UNSENT / OPENED / HEADERS_RECEIVED / LOADING / DONE)
|
|
49
|
+
// since dashboard code may read XMLHttpRequest.DONE etc against the constructor.
|
|
50
|
+
for (const key of ['UNSENT', 'OPENED', 'HEADERS_RECEIVED', 'LOADING', 'DONE']) {
|
|
51
|
+
if (key in OrigXHR) HookedXHR[key] = OrigXHR[key];
|
|
52
|
+
}
|
|
53
|
+
window.XMLHttpRequest = HookedXHR;
|
|
54
|
+
})()`)}async function E(q,z){await m(q);await q.evaluate(`(() => {
|
|
55
|
+
const target = '/statistics/note-detail?noteId=' + ${JSON.stringify(z)};
|
|
56
|
+
history.pushState({}, '', target);
|
|
57
|
+
window.dispatchEvent(new PopStateEvent('popstate'));
|
|
58
|
+
})()`);const Q=B.map((W)=>W.suffix);let K={};for(let W=0;W<f;W++){await q.wait(x);let Z;try{Z=await q.evaluate("JSON.stringify(window.__xhsCapture || {})");K=typeof Z==="string"?JSON.parse(Z):{}}catch{throw new H("xiaohongshu creator-note-detail: failed to read signed datacenter/note capture buffer")}if(!K||typeof K!=="object"||Array.isArray(K))throw new H("xiaohongshu creator-note-detail: malformed signed datacenter/note capture buffer");if(Q.filter((J)=>R(K,J)).length===Q.length)break}const Y={};for(const W of B){const Z=R(K,W.suffix);if(!Z)continue;Y[W.key]=w(K[Z],W)}return Object.keys(Y).length>0?Y:null}async function y(q){const z=await q.evaluate(`() => {
|
|
59
|
+
const norm = (value) => (value || '').trim();
|
|
60
|
+
const sections = Array.from(document.querySelectorAll('.shell-container')).map((container) => {
|
|
61
|
+
const containerText = norm(container.innerText);
|
|
62
|
+
const title = containerText.startsWith('互动数据')
|
|
63
|
+
? '互动数据'
|
|
64
|
+
: containerText.includes('基础数据')
|
|
65
|
+
? '基础数据'
|
|
66
|
+
: '';
|
|
67
|
+
const metrics = Array.from(container.querySelectorAll('.block-container.block')).map((block) => ({
|
|
68
|
+
label: norm(block.querySelector('.des')?.innerText),
|
|
69
|
+
value: norm(block.querySelector('.content')?.innerText),
|
|
70
|
+
extra: norm(block.querySelector('.text-with-fans')?.innerText),
|
|
71
|
+
})).filter((metric) => metric.label && metric.value);
|
|
72
|
+
return { title, metrics };
|
|
73
|
+
}).filter((section) => section.title && section.metrics.length > 0);
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
title: norm(document.querySelector('.note-title')?.innerText),
|
|
77
|
+
infoText: norm(document.querySelector('.note-info-content')?.innerText),
|
|
78
|
+
sections,
|
|
79
|
+
};
|
|
80
|
+
}`);if(!z||typeof z!=="object")return null;return z}export async function fetchCreatorNoteDetailRows(q,z){await q.goto("https://creator.xiaohongshu.com/statistics");const Q=await E(q,z),K=await y(q).catch(()=>null);let Y=parseCreatorNoteDetailDomData(K,z);if(Y.length===0){const W=await q.evaluate("() => document.body.innerText");Y=parseCreatorNoteDetailText(typeof W==="string"?W:"",z)}appendTrendRows(Y,Q??void 0);appendAudienceRows(Y,Q??void 0);return Y}v({site:"xiaohongshu",name:"creator-note-detail",access:"read",description:"小红书单篇笔记详情页数据 (笔记信息 + 核心/互动数据 + 观看来源 + 观众画像 + 趋势数据)",domain:"creator.xiaohongshu.com",strategy:C.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(q,z)=>{const Q=z["note-id"],K=await fetchCreatorNoteDetailRows(q,Q);if(!K.some((W)=>W.section!=="笔记信息"&&W.value))throw new S("xiaohongshu creator-note-detail","No note detail data found. Check note_id and login status for creator.xiaohongshu.com.");return K}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as u,Strategy as m}from"@jackwener/opencli/registry";import{EmptyResultError as d}from"@jackwener/opencli/errors";import{fetchCreatorNotes as h}from"./creator-notes.js";import{fetchCreatorNoteDetailRows as p}from"./creator-note-detail.js";function s(t,o){return t.find((r)=>r.metric===o)?.value??""}function c(t,o,r){const i=t.filter((e)=>e.section===o&&e.metric.startsWith(r)&&e.value);if(i.length===0)return{label:"",value:""};const n=[...i].sort((e,l)=>parseFloat(l.value)-parseFloat(e.value))[0];return{label:n.metric.slice(r.length),value:n.value}}export function summarizeCreatorNote(t,o,r){const i=c(o,"观看来源",""),a=c(o,"观众画像","兴趣/");return{rank:r,id:t.id,title:t.title,published_at:s(o,"published_at")||t.date,views:s(o,"观看数")||String(t.views),likes:s(o,"点赞数")||String(t.likes),collects:s(o,"收藏数")||String(t.collects),comments:s(o,"评论数")||String(t.comments),shares:s(o,"分享数"),avg_view_time:s(o,"平均观看时长"),rise_fans:s(o,"涨粉数"),top_source:i.label,top_source_pct:i.value,top_interest:a.label,top_interest_pct:a.value,url:t.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(t,o)=>{const r=o.limit||3,i=await h(t,r);if(!i.length)throw new d("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,e]of i.entries()){if(n>0)await t.wait({time:1+Math.random()*2});if(!e.id){a.push({rank:n+1,id:e.id,title:e.title,published_at:e.date,views:String(e.views),likes:String(e.likes),collects:String(e.collects),comments:String(e.comments),shares:"",avg_view_time:"",rise_fans:"",top_source:"",top_source_pct:"",top_interest:"",top_interest_pct:"",url:e.url});continue}const l=await p(t,e.id);a.push(summarizeCreatorNote(e,l,n+1))}return a}});
|