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,107 @@
|
|
|
1
|
+
import{cli as M,Strategy as L}from"@jackwener/opencli/registry";import{CommandExecutionError as z,EmptyResultError as I}from"@jackwener/opencli/errors";const C=/^发布于 (\d{4}年\d{2}月\d{2}日 \d{2}:\d{2})$/,P=/^\d+$/,T=/可见$/,S="/api/galaxy/creator/datacenter/note/analyze/list",w=10,v=20,x=0.5,_="https://creator.xiaohongshu.com/statistics/note-detail",A=/"noteId":"([0-9a-f]{24})"/g;function U(K){return K?`${_}?noteId=${encodeURIComponent(K)}`:""}function N(K){if(!K)return"";const J=new Date(K+28800000),Q=($)=>String($).padStart(2,"0");return`${J.getUTCFullYear()}年${Q(J.getUTCMonth()+1)}月${Q(J.getUTCDate())}日 ${Q(J.getUTCHours())}:${Q(J.getUTCMinutes())}`}export function parseCreatorNotesText(K){const J=K.split(`
|
|
2
|
+
`).map((W)=>W.trim()).filter(Boolean),Q=[],$=new Set;for(let W=0;W<J.length;W++){const q=J[W].match(C);if(!q)continue;let X=W-1;while(X>=0&&T.test(J[X]))X--;if(X<0)continue;const G=J[X],F=[];let j=W+1;while(j<J.length&&P.test(J[j])&&F.length<5){F.push(parseInt(J[j],10));j++}if(F.length<4)continue;const V=`${G}@@${q[1]}`;if($.has(V))continue;$.add(V);Q.push({id:"",title:G,date:q[1],views:F[0]??0,likes:F[2]??0,collects:F[3]??0,comments:F[1]??0,url:""});W=j-1}return Q}export function parseCreatorNoteIdsFromHtml(K){const J=[],Q=new Set;for(const $ of K.matchAll(A)){const W=$[1];if(!W||Q.has(W))continue;Q.add(W);J.push(W)}return J}function E(K){return K.map((J)=>({id:J.id,title:J.title,date:J.date,views:J.metrics[0]??0,likes:J.metrics[2]??0,collects:J.metrics[3]??0,comments:J.metrics[1]??0,url:U(J.id)}))}function b(K){return(K??[]).map((J)=>({id:J.id??"",title:J.title??"",date:N(J.post_time),views:J.read_count??0,likes:J.like_count??0,collects:J.fav_count??0,comments:J.comment_count??0,url:U(J.id)}))}function Z(K){if(K&&typeof K==="object"&&!Array.isArray(K)&&"session"in K&&"data"in K)return K.data;return K}async function y(K){await K.evaluate(`(() => {
|
|
3
|
+
window.__xhsCapture = {};
|
|
4
|
+
if (window.__xhsCaptureInstalled) return;
|
|
5
|
+
window.__xhsCaptureInstalled = true;
|
|
6
|
+
const origFetch = window.fetch;
|
|
7
|
+
window.fetch = async function(...args) {
|
|
8
|
+
const resp = await origFetch.apply(this, args);
|
|
9
|
+
try {
|
|
10
|
+
const url = typeof args[0] === 'string' ? args[0] : (args[0] && args[0].url) || '';
|
|
11
|
+
if (url.includes('/api/galaxy/')) {
|
|
12
|
+
resp.clone().text().then((body) => {
|
|
13
|
+
try { window.__xhsCapture[url] = { status: resp.status, ok: resp.ok, body }; } catch (_) {}
|
|
14
|
+
}).catch(() => {});
|
|
15
|
+
}
|
|
16
|
+
} catch (_) {}
|
|
17
|
+
return resp;
|
|
18
|
+
};
|
|
19
|
+
const OrigXHR = window.XMLHttpRequest;
|
|
20
|
+
function HookedXHR() {
|
|
21
|
+
const xhr = new OrigXHR();
|
|
22
|
+
const origOpen = xhr.open;
|
|
23
|
+
let capturedUrl = '';
|
|
24
|
+
xhr.open = function(method, url, ...rest) {
|
|
25
|
+
capturedUrl = url;
|
|
26
|
+
return origOpen.call(this, method, url, ...rest);
|
|
27
|
+
};
|
|
28
|
+
xhr.addEventListener('load', () => {
|
|
29
|
+
try {
|
|
30
|
+
if (capturedUrl.includes('/api/galaxy/')) {
|
|
31
|
+
window.__xhsCapture[capturedUrl] = { status: xhr.status, ok: xhr.status >= 200 && xhr.status < 300, body: xhr.responseText };
|
|
32
|
+
}
|
|
33
|
+
} catch (_) {}
|
|
34
|
+
});
|
|
35
|
+
return xhr;
|
|
36
|
+
}
|
|
37
|
+
HookedXHR.prototype = OrigXHR.prototype;
|
|
38
|
+
for (const key of ['UNSENT', 'OPENED', 'HEADERS_RECEIVED', 'LOADING', 'DONE']) {
|
|
39
|
+
if (key in OrigXHR) HookedXHR[key] = OrigXHR[key];
|
|
40
|
+
}
|
|
41
|
+
window.XMLHttpRequest = HookedXHR;
|
|
42
|
+
})()`)}function O(K){const J=Z(K);if(typeof J==="string")try{return JSON.parse(J)}catch{return{}}if(J&&typeof J==="object"&&!Array.isArray(J))return J;return{}}function R(K){try{const $=new URL(K,"https://creator.xiaohongshu.com"),W=Number.parseInt($.searchParams.get("page_num")||"",10);if(Number.isFinite(W)&&W>0)return W}catch{}const J=String(K||"").match(/[?&]page_num=(\d+)/),Q=Number.parseInt(J?.[1]||"",10);return Number.isFinite(Q)&&Q>0?Q:Number.MAX_SAFE_INTEGER}function D(K){const J=[],Q=new Set;let $=0;const W=Object.entries(K).filter(([q])=>q.includes("/note/analyze/list")).sort(([q],[X])=>R(q)-R(X));for(const[q,X]of W){if(!X?.ok)continue;try{const F=JSON.parse(X.body)?.data??{};if(typeof F.total==="number"&&F.total>$)$=F.total;for(const j of F.note_infos??[]){if(!j?.id||Q.has(j.id))continue;Q.add(j.id);J.push(j)}}catch{}}return{items:J,total:$}}function h(K,J,Q){if(J<=0)return!0;return K.length>=Math.min(J,Q)}async function c(K){let J={};for(let Q=0;Q<v;Q++){await K.wait(x);const $=await K.evaluate("JSON.stringify(window.__xhsCapture || {})");J=O($);if(Object.keys(J).some((W)=>W.includes("/note/analyze/list")))break}return J}async function u(K,J){const Q=new Map,$=async()=>{const q=Z(await K.evaluate(`() => {
|
|
43
|
+
const noteIdRe = /"noteId":"([0-9a-f]{24})"/;
|
|
44
|
+
return Array.from(document.querySelectorAll('div.note[data-impression], div.note')).map((card) => {
|
|
45
|
+
const impression = card.getAttribute('data-impression') || '';
|
|
46
|
+
const id = impression.match(noteIdRe)?.[1] || '';
|
|
47
|
+
const title = (card.querySelector('.title, .raw')?.innerText || '').trim();
|
|
48
|
+
return { id, title };
|
|
49
|
+
}).filter((entry) => entry.id && entry.title);
|
|
50
|
+
}`));for(const X of Array.isArray(q)?q:[])if(!Q.has(X.id))Q.set(X.id,X.title)},W=async()=>{return Z(await K.evaluate(`(() => {
|
|
51
|
+
const firstCard = document.querySelector('div.note[data-impression]');
|
|
52
|
+
let el = firstCard && firstCard.parentElement;
|
|
53
|
+
while (el) {
|
|
54
|
+
const s = window.getComputedStyle(el);
|
|
55
|
+
if ((s.overflowY === 'auto' || s.overflowY === 'scroll') && el.scrollHeight > el.clientHeight + 10) {
|
|
56
|
+
el.scrollTop = el.scrollHeight;
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
el = el.parentElement;
|
|
60
|
+
}
|
|
61
|
+
return false;
|
|
62
|
+
})()`))};try{await K.goto("https://creator.xiaohongshu.com/new/note-manager");for(let q=0;q<12;q++){await K.wait(1);await $();if(Q.size>=J)return Q;await W()}return Q}catch{return Q}}async function g(K,J){await K.goto("https://creator.xiaohongshu.com/statistics");await y(K);await K.evaluate(`(() => {
|
|
63
|
+
history.pushState({}, '', '/statistics/data-analysis?source=official');
|
|
64
|
+
window.dispatchEvent(new PopStateEvent('popstate'));
|
|
65
|
+
})()`);let Q=await c(K),{items:$,total:W}=D(Q);if($.length===0)return[];const q=W>0?Math.ceil(W/w):1,X=Math.min(q,Math.ceil(J/w));for(let j=2;j<=X&&$.length<J;j++){if(!Z(await K.evaluate(`(() => {
|
|
66
|
+
const target = String(${j});
|
|
67
|
+
// .d-pagination-page renders the page number doubled (a visible span +
|
|
68
|
+
// an accessibility span), so textContent for page 2 reads "22". Match
|
|
69
|
+
// both the raw digit and the doubled form to tolerate either render.
|
|
70
|
+
const btns = Array.from(document.querySelectorAll('.d-pagination-page'));
|
|
71
|
+
const match = btns.find((btn) => {
|
|
72
|
+
const text = (btn.textContent || '').trim();
|
|
73
|
+
return text === target || text === target + target;
|
|
74
|
+
});
|
|
75
|
+
if (match) { match.click(); return true; }
|
|
76
|
+
return false;
|
|
77
|
+
})()`)))break;const Y=$.length;let B=!1;for(let f=0;f<v;f++){await K.wait(x);const k=await K.evaluate("JSON.stringify(window.__xhsCapture || {})");Q=O(k);const H=D(Q);if(H.items.length>Y){$=H.items;W=Math.max(W,H.total);B=!0;break}}if(!B)break}if(!h($,W,J))throw new z(`xiaohongshu creator-notes: captured ${$.length} of ${Math.min(W,J)} expected analyze rows; refusing partial results`);const G=b($).slice(0,J);if(G.filter((j)=>!j.title).length>0){const j=await u(K,G.length);for(const V of G)if(!V.title&&V.id&&j.has(V.id))V.title=j.get(V.id)}return G}async function d(K,J){const Q=Math.min(Math.max(J,10),20),$=Math.max(1,Math.ceil(J/Q)),W=[];await K.goto(`https://creator.xiaohongshu.com/statistics/data-analysis?type=0&page_size=${Q}&page_num=1`);for(let q=1;q<=$&&W.length<J;q++){const X=`${S}?type=0&page_size=${Q}&page_num=${q}`;let F=(await K.evaluate(`
|
|
78
|
+
async () => {
|
|
79
|
+
try {
|
|
80
|
+
const resp = await fetch(${JSON.stringify(X)}, { credentials: 'include' });
|
|
81
|
+
if (!resp.ok) return { error: 'HTTP ' + resp.status };
|
|
82
|
+
return await resp.json();
|
|
83
|
+
} catch (e) {
|
|
84
|
+
return { error: e?.message ?? String(e) };
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
`))?.data?.note_infos??[];if(!F.length){await K.installInterceptor(S);await K.evaluate(`
|
|
88
|
+
async () => {
|
|
89
|
+
try {
|
|
90
|
+
await fetch(${JSON.stringify(X)}, { credentials: 'include' });
|
|
91
|
+
} catch {}
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
`);await K.wait(1);F=(await K.getInterceptedRequests()).find((Y)=>Array.isArray(Y?.data?.note_infos))?.data?.note_infos??[]}if(!F.length)break;W.push(...b(F));if(F.length<Q)break}return W.slice(0,J)}export async function fetchCreatorNotes(K,J){let Q=[];try{Q=await g(K,J)}catch($){if($ instanceof z)throw $}if(Q.length===0)Q=await d(K,J);if(Q.length===0){await K.goto("https://creator.xiaohongshu.com/new/note-manager");const $=Math.max(0,Math.ceil(J/10)+1);for(let W=0;W<=$;W++){const q=await K.evaluate(`() => {
|
|
95
|
+
const noteIdRe = /"noteId":"([0-9a-f]{24})"/;
|
|
96
|
+
return Array.from(document.querySelectorAll('div.note[data-impression], div.note')).map((card) => {
|
|
97
|
+
const impression = card.getAttribute('data-impression') || '';
|
|
98
|
+
const id = impression.match(noteIdRe)?.[1] || '';
|
|
99
|
+
const title = (card.querySelector('.title, .raw')?.innerText || '').trim();
|
|
100
|
+
const dateText = (card.querySelector('.time_status, .time')?.innerText || '').trim();
|
|
101
|
+
const date = dateText.replace(/^发布于\\s*/, '');
|
|
102
|
+
const metrics = Array.from(card.querySelectorAll('.icon_list .icon'))
|
|
103
|
+
.map((el) => parseInt((el.innerText || '').trim(), 10))
|
|
104
|
+
.filter((value) => Number.isFinite(value));
|
|
105
|
+
return { id, title, date, metrics };
|
|
106
|
+
});
|
|
107
|
+
}`),X=E(Array.isArray(q)?q:[]).filter((B)=>B.title&&B.date);if(X.length>0)Q=X;if(Q.length>=J||Q.length>0&&W===0)break;const G=await K.evaluate("() => ({ text: document.body.innerText, html: document.body.innerHTML })"),F=typeof G?.text==="string"?G.text:"",j=typeof G?.html==="string"?G.html:"",V=parseCreatorNotesText(F),Y=parseCreatorNoteIdsFromHtml(j);Q=V.map((B,f)=>{const k=Y[f]??"";return{...B,id:k,url:U(k)}});if(Q.length>=J||W===$)break;await K.pressKey("PageDown");await K.wait(1)}}return Q.slice(0,J)}M({site:"xiaohongshu",name:"creator-notes",access:"read",description:"小红书创作者笔记列表 + 每篇数据 (标题/日期/观看/点赞/收藏/评论)",domain:"creator.xiaohongshu.com",strategy:L.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"limit",type:"int",default:20,help:"Number of notes to return"}],columns:["rank","id","title","date","views","likes","collects","comments","url"],func:async(K,J)=>{const Q=J.limit||20,$=await fetchCreatorNotes(K,Q);if(!Array.isArray($)||$.length===0)throw new I("xiaohongshu creator-notes","No notes found. Ensure you are logged into creator.xiaohongshu.com and the account has published notes.");return $.slice(0,Q).map((W,q)=>({rank:q+1,id:W.id,title:W.title,date:W.date,views:W.views,likes:W.likes,collects:W.collects,comments:W.comments,url:W.url}))}});export const __test__={harvestAnalyzeListCaptures:D,isAnalyzeCaptureComplete:h,parseCaptureMapPayload:O,unwrapEvaluateResult:Z};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{cli as t,Strategy as n}from"@jackwener/opencli/registry";t({site:"xiaohongshu",name:"creator-profile",access:"read",description:"小红书创作者账号信息 (粉丝/关注/获赞/成长等级)",domain:"creator.xiaohongshu.com",strategy:n.COOKIE,browser:!0,navigateBefore:!1,args:[],columns:["field","value"],func:async(a,s)=>{await a.goto("https://creator.xiaohongshu.com/new/home");const o=await a.evaluate(`
|
|
2
|
+
async () => {
|
|
3
|
+
try {
|
|
4
|
+
const resp = await fetch('/api/galaxy/creator/home/personal_info', {
|
|
5
|
+
credentials: 'include',
|
|
6
|
+
});
|
|
7
|
+
if (!resp.ok) return { error: 'HTTP ' + resp.status };
|
|
8
|
+
return await resp.json();
|
|
9
|
+
} catch (e) {
|
|
10
|
+
return { error: e.message };
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
`);if(o?.error)throw Error(o.error+". Are you logged into creator.xiaohongshu.com?");if(!o?.data)throw Error("Unexpected response structure");const e=o.data,r=e.grow_info||{};return[{field:"Name",value:e.name??""},{field:"Followers",value:e.fans_count??0},{field:"Following",value:e.follow_count??0},{field:"Likes & Collects",value:e.faved_count??0},{field:"Creator Level",value:r.level??0},{field:"Level Progress",value:`${r.fans_count??0}/${r.max_fans_count??0} fans`},{field:"Bio",value:(e.personal_desc??"").replace(/\\n/g," | ")}]}});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{cli as C,Strategy as D}from"@jackwener/opencli/registry";import{EmptyResultError as G}from"@jackwener/opencli/errors";C({site:"xiaohongshu",name:"creator-stats",access:"read",description:"小红书创作者数据总览 (观看/点赞/收藏/评论/分享/涨粉,含每日趋势)",domain:"creator.xiaohongshu.com",strategy:D.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"period",type:"string",default:"seven",help:"Stats period: seven or thirty",choices:["seven","thirty"]}],columns:["metric","total","trend"],func:async(x,A)=>{const z=A.period||"seven";await x.goto("https://creator.xiaohongshu.com/new/home");const q=await x.evaluate(`
|
|
2
|
+
async () => {
|
|
3
|
+
try {
|
|
4
|
+
const resp = await fetch('/api/galaxy/creator/data/note_detail_new', {
|
|
5
|
+
credentials: 'include',
|
|
6
|
+
});
|
|
7
|
+
if (!resp.ok) return { error: 'HTTP ' + resp.status };
|
|
8
|
+
return await resp.json();
|
|
9
|
+
} catch (e) {
|
|
10
|
+
return { error: e.message };
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
`);if(q?.error)throw Error(q.error+". Are you logged into creator.xiaohongshu.com?");if(!q?.data)throw Error("Unexpected response structure");const b=q.data[z];if(!b)throw new G("xiaohongshu creator-stats",`No data for period "${z}". Available: ${Object.keys(q.data).join(", ")}`);const h=(v)=>{if(!v||!v.length)return"-";return v.map((B)=>B.count).join(" → ")};return[{metric:"观看数 (views)",total:b.view_count??0,trend:h(b.view_list)},{metric:"平均观看时长 (avg view time ms)",total:b.view_time_avg??0,trend:h(b.view_time_list)},{metric:"主页访问 (home views)",total:b.home_view_count??0,trend:h(b.home_view_list)},{metric:"点赞数 (likes)",total:b.like_count??0,trend:h(b.like_list)},{metric:"收藏数 (collects)",total:b.collect_count??0,trend:h(b.collect_list)},{metric:"评论数 (comments)",total:b.comment_count??0,trend:h(b.comment_list)},{metric:"弹幕数 (danmaku)",total:b.danmaku_count??0,trend:"-"},{metric:"分享数 (shares)",total:b.share_count??0,trend:h(b.share_list)},{metric:"涨粉数 (new followers)",total:b.rise_fans_count??0,trend:h(b.rise_fans_list)}]}});
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import{cli as O,Strategy as k}from"@jackwener/opencli/registry";import{ArgumentError as H,AuthRequiredError as L,CliError as h,CommandExecutionError as $,EmptyResultError as M}from"@jackwener/opencli/errors";const A="https://creator.xiaohongshu.com/new/note-manager",Y=3000,T=2000,w=1e4,f=1000,D=/^[0-9a-f]{24}$/i;function W(J){if(J&&typeof J==="object"&&"session"in J&&"data"in J)return J.data;return J}function C(J,Z){if(typeof J!=="string")throw new $(`xiaohongshu/delete-note: malformed ${Z} payload`);return J}function P(J,Z){if(typeof J!=="boolean")throw new $(`xiaohongshu/delete-note: malformed ${Z} payload`);return J}function S(J,Z){if(!J||typeof J!=="object"||Array.isArray(J))throw new $(`xiaohongshu/delete-note: malformed ${Z} payload`);return J}function V(J,Z){const K=S(J,Z);if(typeof K.ok!=="boolean")throw new $(`xiaohongshu/delete-note: malformed ${Z} payload`);return K}function _(J){const Z=String(J||"").toLowerCase();return Z==="xiaohongshu.com"||Z.endsWith(".xiaohongshu.com")}function x(J){return J.hostname.toLowerCase()==="creator.xiaohongshu.com"&&J.pathname.replace(/\/+$/,"")==="/statistics/note-detail"}function U(J){const Z=String(J??"").trim();if(!Z)throw new H("xiaohongshu/delete-note: note-id cannot be empty");if(D.test(Z))return Z.toLowerCase();if(!/^https:\/\//i.test(Z))throw new H("xiaohongshu/delete-note: note-id must be a 24-character Xiaohongshu note ID or an exact Xiaohongshu note URL");let K;try{K=new URL(Z)}catch{throw new H("xiaohongshu/delete-note: invalid note URL")}if(K.protocol!=="https:"||K.username||K.password||K.port||!_(K.hostname))throw new H("xiaohongshu/delete-note: note URL must be an exact https://*.xiaohongshu.com URL");const Q=K.searchParams.get("noteId")||K.searchParams.get("note_id");if(Q&&D.test(Q)&&x(K))return Q.toLowerCase();const X=K.pathname.match(/^\/(?:explore|note|search_result|discovery\/item)\/([0-9a-f]{24})\/?$/i)||K.pathname.match(/^\/user\/profile\/[^/?#]+\/([0-9a-f]{24})\/?$/i);if(X)return X[1].toLowerCase();throw new H("xiaohongshu/delete-note: note URL must contain a 24-character note ID")}function N(J,Z){return`
|
|
2
|
+
(cfg => {
|
|
3
|
+
const { targetId, shouldClick } = cfg;
|
|
4
|
+
const isVisible = (el) => !!el && el.offsetParent !== null;
|
|
5
|
+
const matchesNoteId = (impressionRaw) => {
|
|
6
|
+
if (!impressionRaw) return false;
|
|
7
|
+
try {
|
|
8
|
+
const parsed = JSON.parse(impressionRaw);
|
|
9
|
+
const id = parsed && parsed.noteTarget && parsed.noteTarget.value && parsed.noteTarget.value.noteId;
|
|
10
|
+
return typeof id === 'string' && id === targetId;
|
|
11
|
+
} catch {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const notes = Array.from(document.querySelectorAll('.note')).filter(isVisible);
|
|
16
|
+
for (const note of notes) {
|
|
17
|
+
if (matchesNoteId(note.getAttribute('data-impression'))) {
|
|
18
|
+
const del = note.querySelector('span.control.data-del');
|
|
19
|
+
if (!del || !isVisible(del)) {
|
|
20
|
+
return { ok: false, kind: 'no_delete_action', visibleRows: notes.length };
|
|
21
|
+
}
|
|
22
|
+
if (!shouldClick) {
|
|
23
|
+
return { ok: true, clicked: false };
|
|
24
|
+
}
|
|
25
|
+
del.click();
|
|
26
|
+
return { ok: true, clicked: true };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return { ok: false, kind: 'not_found', visibleRows: notes.length };
|
|
30
|
+
})(${JSON.stringify({targetId:J,shouldClick:Z})})
|
|
31
|
+
`}function v(J){return`
|
|
32
|
+
(targetId => {
|
|
33
|
+
const matchesNoteId = (impressionRaw) => {
|
|
34
|
+
if (!impressionRaw) return false;
|
|
35
|
+
try {
|
|
36
|
+
const parsed = JSON.parse(impressionRaw);
|
|
37
|
+
const id = parsed && parsed.noteTarget && parsed.noteTarget.value && parsed.noteTarget.value.noteId;
|
|
38
|
+
return typeof id === 'string' && id === targetId;
|
|
39
|
+
} catch {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const notes = Array.from(document.querySelectorAll('.note'));
|
|
44
|
+
return notes.some((n) => matchesNoteId(n.getAttribute('data-impression')));
|
|
45
|
+
})(${JSON.stringify(J)})
|
|
46
|
+
`}O({site:"xiaohongshu",name:"delete-note",access:"write",description:"删除小红书已发布笔记 (creator center UI automation)",domain:"creator.xiaohongshu.com",strategy:k.COOKIE,navigateBefore:!1,browser:!0,args:[{name:"note-id",required:!0,positional:!0,help:"Note ID (e.g. 6a08ba0b000000000702a893 from xiaohongshu creator-notes / URL)"},{name:"execute",type:"boolean",default:!1,help:"Actually click delete + confirm. Default is dry-run target verification only."}],columns:["status","note_id","message"],func:async(J,Z)=>{try{const K=U(Z["note-id"]),Q=Z.execute===!0;await J.goto(A);await J.wait({time:Y/1000});const X=C(W(await J.evaluate("() => location.href")),"current-url");if(typeof X==="string"&&/\/login(?:[/?#]|$)/i.test(new URL(X).pathname+new URL(X).search))throw new L("creator.xiaohongshu.com");const b=`
|
|
47
|
+
() => {
|
|
48
|
+
const isVisible = (el) => !!el && el.offsetParent !== null;
|
|
49
|
+
for (const el of document.querySelectorAll('a, button, [role="tab"], div')) {
|
|
50
|
+
const text = (el.innerText || el.textContent || '').trim();
|
|
51
|
+
if (text === '已发布' && isVisible(el)) {
|
|
52
|
+
el.click();
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
`;let j=!1;for(let z=0;z<30;z++){j=P(W(await J.evaluate(b)),"published-tab");if(j)break;await J.wait({time:0.5})}if(!j)throw new $("xiaohongshu/delete-note: 已发布 tab not found on note-manager; xhs creator UI may have changed.");await J.wait({time:Y/1000});const G=V(W(await J.evaluate(N(K,Q))),"locate-note");if(!G?.ok){if(G?.kind==="not_found")throw new M("xiaohongshu/delete-note",`Note ${K} not visible in the 已发布 tab. Verify the note belongs to the logged-in account and has cleared review (审核中 / 未通过 rows have no web delete entry).`);if(G?.kind==="no_delete_action")throw new $(`xiaohongshu/delete-note: note ${K} row found but no delete action visible; xhs creator UI may have changed.`);throw new $("xiaohongshu/delete-note: failed to locate note row")}if(!Q)return[{status:"dry-run",note_id:K,message:"Target note row and delete action verified. Re-run with --execute to delete."}];await J.wait({time:T/1000});const B=V(W(await J.evaluate(`
|
|
59
|
+
() => {
|
|
60
|
+
const isVisible = (el) => !!el && el.offsetParent !== null;
|
|
61
|
+
const footer = Array.from(document.querySelectorAll('.d-modal-footer')).find(isVisible);
|
|
62
|
+
if (!footer) return { ok: false, kind: 'no_modal' };
|
|
63
|
+
const buttons = Array.from(footer.querySelectorAll('button, [role="button"]')).filter(isVisible);
|
|
64
|
+
const confirmBtn = buttons.find((b) => (b.innerText || b.textContent || '').trim() === '确定');
|
|
65
|
+
if (!confirmBtn) return { ok: false, kind: 'no_confirm', labels: buttons.map(b => (b.innerText || '').trim()) };
|
|
66
|
+
confirmBtn.click();
|
|
67
|
+
return { ok: true };
|
|
68
|
+
}
|
|
69
|
+
`)),"confirm-modal");if(!B?.ok)throw new $(`xiaohongshu/delete-note: confirmation modal step failed (${B?.kind??"unknown"})`);const q=Math.ceil(w/f);let F=!0;for(let z=0;z<q;z++){await J.wait({time:f/1000});if(P(W(await J.evaluate(v(K))),"verify-gone")===!1){F=!1;break}}if(F)throw new $(`xiaohongshu/delete-note: note ${K} still visible after confirm click; deletion may not have committed.`);return[{status:"deleted",note_id:K,message:"Delete confirmed and note row disappeared."}]}catch(K){if(K instanceof h)throw K;throw new $(`xiaohongshu/delete-note failed: ${K?.message??String(K)}`)}}});export const __test__={normalizeNoteId:U,buildLocateAndMaybeDeleteScript:N,buildVerifyGoneScript:v};
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import{cli as O,Strategy as P}from"@jackwener/opencli/registry";import{formatCookieHeader as Q}from"@jackwener/opencli/download";import{downloadMedia as T}from"@jackwener/opencli/download/media-download";import{CliError as V,CommandExecutionError as W,EmptyResultError as X}from"@jackwener/opencli/errors";import{buildNoteUrl as Y,parseNoteId as Z}from"./note-helpers.js";export function buildDownloadExtractJs(z){return`
|
|
2
|
+
(() => {
|
|
3
|
+
const bodyText = document.body?.innerText || '';
|
|
4
|
+
const result = {
|
|
5
|
+
noteId: '${z}',
|
|
6
|
+
pageUrl: location.href,
|
|
7
|
+
securityBlock: /安全限制|访问链接异常/.test(bodyText)
|
|
8
|
+
|| /website-login\\/error|error_code=300017|error_code=300031/.test(location.href),
|
|
9
|
+
title: '',
|
|
10
|
+
author: '',
|
|
11
|
+
media: []
|
|
12
|
+
};
|
|
13
|
+
const seenMedia = new Set();
|
|
14
|
+
const pushMedia = (type, url) => {
|
|
15
|
+
if (!url) return;
|
|
16
|
+
const key = type + ':' + url;
|
|
17
|
+
if (seenMedia.has(key)) return;
|
|
18
|
+
seenMedia.add(key);
|
|
19
|
+
result.media.push({ type, url });
|
|
20
|
+
};
|
|
21
|
+
const locationMatch = (location.pathname || '').match(/\\/(?:explore|note|search_result|discovery\\/item)\\/([a-f0-9]+)|\\/user\\/profile\\/[^/?#]+\\/([a-f0-9]+)/i);
|
|
22
|
+
if (locationMatch) {
|
|
23
|
+
result.noteId = locationMatch[1] || locationMatch[2];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Get title
|
|
27
|
+
const titleEl = document.querySelector('.title, #detail-title, .note-content .title');
|
|
28
|
+
result.title = titleEl?.textContent?.trim() || 'untitled';
|
|
29
|
+
|
|
30
|
+
// Get author
|
|
31
|
+
const authorEl = document.querySelector('.username, .author-name, .name');
|
|
32
|
+
result.author = authorEl?.textContent?.trim() || 'unknown';
|
|
33
|
+
|
|
34
|
+
// Get images: prefer canonical carousel order from __INITIAL_STATE__
|
|
35
|
+
// so the saved order matches what the user sees on the platform (#1514).
|
|
36
|
+
// DOM extraction is used only as a fallback because multiple selectors,
|
|
37
|
+
// hidden / duplicated / preloaded slides, and lazy rendering can reorder
|
|
38
|
+
// the discovered nodes away from the platform's display order.
|
|
39
|
+
|
|
40
|
+
const normalizeImageUrl = (raw) => {
|
|
41
|
+
if (!raw || typeof raw !== 'string') return '';
|
|
42
|
+
let src = raw.split('?')[0];
|
|
43
|
+
src = src.replace(/\\/imageView\\d+\\/\\d+\\/w\\/\\d+/, '');
|
|
44
|
+
return src;
|
|
45
|
+
};
|
|
46
|
+
const orderedImageUrls = [];
|
|
47
|
+
const seenImageUrls = new Set();
|
|
48
|
+
const pushImage = (url) => {
|
|
49
|
+
if (!url || seenImageUrls.has(url)) return;
|
|
50
|
+
seenImageUrls.add(url);
|
|
51
|
+
orderedImageUrls.push(url);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const getStructuredNotes = () => {
|
|
55
|
+
const state = window.__INITIAL_STATE__;
|
|
56
|
+
const noteData = state?.note?.noteDetailMap || state?.note?.note || {};
|
|
57
|
+
if (!noteData || typeof noteData !== 'object') return [];
|
|
58
|
+
const currentIds = [...new Set([result.noteId, '${z}'].filter(Boolean))];
|
|
59
|
+
const notes = [];
|
|
60
|
+
for (const id of currentIds) {
|
|
61
|
+
const entry = noteData[id];
|
|
62
|
+
const note = entry?.note || entry;
|
|
63
|
+
if (note && typeof note === 'object') notes.push(note);
|
|
64
|
+
}
|
|
65
|
+
// Compatibility fallback for legacy single-note stores. Do not use this
|
|
66
|
+
// when keyed detail maps contain multiple notes, or carousel order can
|
|
67
|
+
// be polluted by preloaded/previous note entries.
|
|
68
|
+
const keys = Object.keys(noteData);
|
|
69
|
+
if (notes.length === 0 && keys.length === 1) {
|
|
70
|
+
const entry = noteData[keys[0]];
|
|
71
|
+
const note = entry?.note || entry;
|
|
72
|
+
if (note && typeof note === 'object') notes.push(note);
|
|
73
|
+
}
|
|
74
|
+
return notes;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
// Method 1: walk __INITIAL_STATE__.note.noteDetailMap[id].note.imageList
|
|
78
|
+
// in array order. Each entry exposes urlDefault as the canonical CDN URL.
|
|
79
|
+
let imageInitialStateUsed = false;
|
|
80
|
+
try {
|
|
81
|
+
for (const note of getStructuredNotes()) {
|
|
82
|
+
const list = Array.isArray(note?.imageList) ? note.imageList : [];
|
|
83
|
+
for (const item of list) {
|
|
84
|
+
const candidate = item?.urlDefault || item?.urlPre || item?.url
|
|
85
|
+
|| item?.infoList?.find(i => i?.imageScene === 'WB_DFT')?.url
|
|
86
|
+
|| item?.infoList?.[0]?.url
|
|
87
|
+
|| '';
|
|
88
|
+
const src = normalizeImageUrl(candidate);
|
|
89
|
+
if (src && (src.includes('xhscdn') || src.includes('xiaohongshu') || src.includes('rednote'))) {
|
|
90
|
+
pushImage(src);
|
|
91
|
+
imageInitialStateUsed = true;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
} catch(e) {}
|
|
96
|
+
|
|
97
|
+
// Method 2: fallback to DOM scraping when the structured state is missing
|
|
98
|
+
// (e.g. preview pages without full SSR hydration). Order may differ from
|
|
99
|
+
// the carousel; surface it anyway rather than returning zero images.
|
|
100
|
+
if (!imageInitialStateUsed) {
|
|
101
|
+
const imageSelectors = [
|
|
102
|
+
'.swiper-slide img',
|
|
103
|
+
'.carousel-image img',
|
|
104
|
+
'.note-slider img',
|
|
105
|
+
'.note-image img',
|
|
106
|
+
'.image-wrapper img',
|
|
107
|
+
'#noteContainer .media-container img[src*="xhscdn"]',
|
|
108
|
+
'img[src*="ci.xiaohongshu.com"]'
|
|
109
|
+
];
|
|
110
|
+
for (const selector of imageSelectors) {
|
|
111
|
+
document.querySelectorAll(selector).forEach(img => {
|
|
112
|
+
const raw = img.src || img.getAttribute('data-src') || '';
|
|
113
|
+
const src = normalizeImageUrl(raw);
|
|
114
|
+
if (src && (src.includes('xhscdn') || src.includes('xiaohongshu') || src.includes('rednote'))) {
|
|
115
|
+
pushImage(src);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Get video — prefer real URL from page state over blob: URLs
|
|
122
|
+
|
|
123
|
+
// Method 1: Extract from __INITIAL_STATE__ (SSR hydration data)
|
|
124
|
+
try {
|
|
125
|
+
for (const note of getStructuredNotes()) {
|
|
126
|
+
const video = note?.video;
|
|
127
|
+
if (video) {
|
|
128
|
+
const vUrl = video.url || video.originVideoKey || video.consumer?.originVideoKey;
|
|
129
|
+
if (vUrl) {
|
|
130
|
+
const fullUrl = vUrl.startsWith('http') ? vUrl : 'https://sns-video-bd.xhscdn.com/' + vUrl;
|
|
131
|
+
pushMedia('video', fullUrl);
|
|
132
|
+
}
|
|
133
|
+
// xiaohongshu publishes each video under several codecs
|
|
134
|
+
// (h264 + h265/hevc, occasionally h266/av1). The 1080p/2K
|
|
135
|
+
// rendition is frequently carried ONLY by h265, so reading the
|
|
136
|
+
// h264 list alone silently caps downloads at 720p. Pick the
|
|
137
|
+
// highest-resolution master across every codec; at equal
|
|
138
|
+
// resolution prefer the most compatible codec (h264 > h265 >
|
|
139
|
+
// h266 > av1), and only then the higher bitrate.
|
|
140
|
+
const codecStreams = video.media?.stream || {};
|
|
141
|
+
const codecPreference = ['h264', 'h265', 'h266', 'av1'];
|
|
142
|
+
const allStreams = [];
|
|
143
|
+
codecPreference.forEach((codec, rank) => {
|
|
144
|
+
(codecStreams[codec] || []).forEach(s => {
|
|
145
|
+
if (s && s.masterUrl) allStreams.push({ stream: s, rank });
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
if (allStreams.length) {
|
|
149
|
+
const best = allStreams.slice().sort((a, b) =>
|
|
150
|
+
(b.stream.height || 0) - (a.stream.height || 0)
|
|
151
|
+
|| a.rank - b.rank
|
|
152
|
+
|| (b.stream.videoBitrate || 0) - (a.stream.videoBitrate || 0))[0];
|
|
153
|
+
if (best.stream.masterUrl) pushMedia('video', best.stream.masterUrl);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
} catch(e) {}
|
|
158
|
+
|
|
159
|
+
// Method 2: Extract video URLs from inline script JSON
|
|
160
|
+
if (result.media.filter(m => m.type === 'video').length === 0) {
|
|
161
|
+
try {
|
|
162
|
+
const scripts = document.querySelectorAll('script');
|
|
163
|
+
for (const s of scripts) {
|
|
164
|
+
const text = s.textContent || '';
|
|
165
|
+
const videoMatches = text.match(/https?:\\/\\/sns-video[^"'\\s]+\\.mp4[^"'\\s]*/g)
|
|
166
|
+
|| text.match(/https?:\\/\\/[^"'\\s]*xhscdn[^"'\\s]*\\.mp4[^"'\\s]*/g);
|
|
167
|
+
if (videoMatches) {
|
|
168
|
+
videoMatches.forEach(url => {
|
|
169
|
+
pushMedia('video', url.replace(/\\\\u002F/g, '/'));
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
} catch(e) {}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Method 3: Fallback to DOM video elements, skip blob: URLs
|
|
177
|
+
if (result.media.filter(m => m.type === 'video').length === 0) {
|
|
178
|
+
const videoSelectors = [
|
|
179
|
+
'video source',
|
|
180
|
+
'video[src]',
|
|
181
|
+
'.player video',
|
|
182
|
+
'.video-player video'
|
|
183
|
+
];
|
|
184
|
+
for (const selector of videoSelectors) {
|
|
185
|
+
document.querySelectorAll(selector).forEach(v => {
|
|
186
|
+
const src = v.src || v.getAttribute('src') || '';
|
|
187
|
+
if (src && !src.startsWith('blob:')) {
|
|
188
|
+
pushMedia('video', src);
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Preserve the pre-existing media type order (videos first, then images)
|
|
195
|
+
// while keeping image carousel order stable within the image batch.
|
|
196
|
+
orderedImageUrls.forEach(url => pushMedia('image', url));
|
|
197
|
+
|
|
198
|
+
return result;
|
|
199
|
+
})()
|
|
200
|
+
`}export const command=O({site:"xiaohongshu",name:"download",access:"read",description:"下载小红书笔记中的图片和视频",domain:"www.xiaohongshu.com",strategy:P.COOKIE,navigateBefore:!1,args:[{name:"note-id",positional:!0,required:!0,help:"Full Xiaohongshu note URL with xsec_token, or xhslink short link"},{name:"output",default:"./xiaohongshu-downloads",help:"Output directory"}],columns:["index","type","status","size"],func:async(z,B)=>{const A=String(B["note-id"]),K=B.output,F=Z(A);await z.goto(Y(A,{allowShortLink:!0,commandName:"xiaohongshu download"}));await z.wait({time:1+Math.random()*2});const q=await z.evaluate(buildDownloadExtractJs(F));if(q?.securityBlock)throw new V("SECURITY_BLOCK","Xiaohongshu security block: the note detail page was blocked by risk control.",/^https?:\/\//.test(A)?"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||typeof q!=="object"||!Array.isArray(q.media))throw new W("Xiaohongshu media extraction returned malformed payload.");if(q.media.length===0)throw new X("xiaohongshu download","No downloadable media found on this note.");const L=Q(await z.getCookies({domain:"xiaohongshu.com"})),G=typeof q.noteId==="string"&&q.noteId.trim()?q.noteId.trim():F;return T(q.media,{output:K,subdir:G,cookies:L,filenamePrefix:G,timeout:60000})}});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import{CommandExecutionError as s}from"@jackwener/opencli/errors";import{cli as l,Strategy as f}from"@jackwener/opencli/registry";import{DRAFT_DB_NAME as u,STORE_NAME_MAP as n,ensureDraftDbPage as i,normalizeDraftType as d,unwrapBrowserResult as m}from"./draft-utils.js";function b(o,a){return`
|
|
2
|
+
(async () => {
|
|
3
|
+
const openDb = () => new Promise((resolve, reject) => {
|
|
4
|
+
const req = indexedDB.open(${JSON.stringify(u)});
|
|
5
|
+
req.onsuccess = () => resolve(req.result);
|
|
6
|
+
req.onerror = () => reject(req.error || new Error('failed to open IndexedDB'));
|
|
7
|
+
});
|
|
8
|
+
const countStore = (db, storeName) => new Promise((resolve, reject) => {
|
|
9
|
+
if (!db.objectStoreNames.contains(storeName)) return resolve(0);
|
|
10
|
+
const tx = db.transaction(storeName, 'readonly');
|
|
11
|
+
const store = tx.objectStore(storeName);
|
|
12
|
+
const req = store.count();
|
|
13
|
+
req.onsuccess = () => resolve(req.result || 0);
|
|
14
|
+
req.onerror = () => reject(req.error || new Error('failed to count drafts'));
|
|
15
|
+
tx.onerror = () => reject(tx.error || new Error('failed to count drafts'));
|
|
16
|
+
});
|
|
17
|
+
const clearStore = (db, storeName) => new Promise((resolve, reject) => {
|
|
18
|
+
if (!db.objectStoreNames.contains(storeName)) return resolve(true);
|
|
19
|
+
const tx = db.transaction(storeName, 'readwrite');
|
|
20
|
+
const store = tx.objectStore(storeName);
|
|
21
|
+
const req = store.clear();
|
|
22
|
+
req.onsuccess = () => resolve(true);
|
|
23
|
+
req.onerror = () => reject(req.error || new Error('failed to clear drafts'));
|
|
24
|
+
tx.onerror = () => reject(tx.error || new Error('failed to clear drafts'));
|
|
25
|
+
});
|
|
26
|
+
try {
|
|
27
|
+
const db = await openDb();
|
|
28
|
+
const storeNames = ${JSON.stringify(o)};
|
|
29
|
+
let before = 0;
|
|
30
|
+
for (const storeName of storeNames) before += await countStore(db, storeName);
|
|
31
|
+
if (${JSON.stringify(a)}) {
|
|
32
|
+
for (const storeName of storeNames) await clearStore(db, storeName);
|
|
33
|
+
let after = 0;
|
|
34
|
+
for (const storeName of storeNames) after += await countStore(db, storeName);
|
|
35
|
+
db.close();
|
|
36
|
+
return { ok: true, before, after, cleared: before - after };
|
|
37
|
+
}
|
|
38
|
+
db.close();
|
|
39
|
+
return { ok: true, before, after: before, cleared: 0 };
|
|
40
|
+
} catch (error) {
|
|
41
|
+
return { ok: false, error: String(error && error.message || error) };
|
|
42
|
+
}
|
|
43
|
+
})()
|
|
44
|
+
`}l({site:"xiaohongshu",name:"draft-clear",access:"write",description:"清空小红书本地草稿",domain:"creator.xiaohongshu.com",strategy:f.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"type",default:"image",help:"Draft type: image, video, article, audio, all"},{name:"execute",type:"bool",default:!1,help:"Actually clear local drafts. Default is dry-run count only."}],columns:["status","type","count","message"],func:async(o,a)=>{const t=d(a.type,{allowAll:!0}),e=a.execute===!0,c=t==="all"?Object.values(n):[n[t]];await i(o);const r=m(await o.evaluate(b(c,e)));if(!r?.ok)throw new s(r?.error||`Failed to ${e?"clear":"count"} ${t} drafts`);if(e&&Number(r.after)!==0)throw new s(`${r.after} ${t} drafts still exist after clear`);return[{status:e?"cleared":"dry-run",type:t,count:e?Number(r.cleared||0):Number(r.before||0),message:e?"Drafts cleared.":"Drafts counted. Re-run with --execute to clear."}]}});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import{CommandExecutionError as i}from"@jackwener/opencli/errors";import{cli as f,Strategy as u}from"@jackwener/opencli/registry";import{DRAFT_DB_NAME as y,STORE_NAME_MAP as m,draftNotFound as w,ensureDraftDbPage as p,findDraftEntry as x,normalizeDraftId as g,normalizeDraftRecord as D,normalizeDraftType as h,readDraftEntries as b,unwrapBrowserResult as q}from"./draft-utils.js";function S(e,t){return`
|
|
2
|
+
(async () => {
|
|
3
|
+
const openDb = () => new Promise((resolve, reject) => {
|
|
4
|
+
const req = indexedDB.open(${JSON.stringify(y)});
|
|
5
|
+
req.onsuccess = () => resolve(req.result);
|
|
6
|
+
req.onerror = () => reject(req.error || new Error('failed to open IndexedDB'));
|
|
7
|
+
});
|
|
8
|
+
try {
|
|
9
|
+
const db = await openDb();
|
|
10
|
+
if (!db.objectStoreNames.contains(${JSON.stringify(e)})) {
|
|
11
|
+
db.close();
|
|
12
|
+
return { ok: false, error: 'draft store not found' };
|
|
13
|
+
}
|
|
14
|
+
const key = ${JSON.stringify(t)};
|
|
15
|
+
await new Promise((resolve, reject) => {
|
|
16
|
+
const tx = db.transaction(${JSON.stringify(e)}, 'readwrite');
|
|
17
|
+
const store = tx.objectStore(${JSON.stringify(e)});
|
|
18
|
+
const req = store.delete(key);
|
|
19
|
+
req.onsuccess = () => resolve(true);
|
|
20
|
+
req.onerror = () => reject(req.error || new Error('failed to delete draft'));
|
|
21
|
+
tx.onerror = () => reject(tx.error || new Error('failed to delete draft'));
|
|
22
|
+
});
|
|
23
|
+
const after = await new Promise((resolve, reject) => {
|
|
24
|
+
const tx = db.transaction(${JSON.stringify(e)}, 'readonly');
|
|
25
|
+
const store = tx.objectStore(${JSON.stringify(e)});
|
|
26
|
+
const req = store.get(key);
|
|
27
|
+
req.onsuccess = () => resolve(req.result ?? null);
|
|
28
|
+
req.onerror = () => reject(req.error || new Error('failed to verify draft delete'));
|
|
29
|
+
tx.onerror = () => reject(tx.error || new Error('failed to verify draft delete'));
|
|
30
|
+
});
|
|
31
|
+
db.close();
|
|
32
|
+
return { ok: true, deleted: after === null };
|
|
33
|
+
} catch (error) {
|
|
34
|
+
return { ok: false, error: String(error && error.message || error) };
|
|
35
|
+
}
|
|
36
|
+
})()
|
|
37
|
+
`}f({site:"xiaohongshu",name:"draft-delete",access:"write",description:"删除一条小红书本地草稿",domain:"creator.xiaohongshu.com",strategy:u.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"id",positional:!0,required:!0,help:"Draft id returned by `opencli xiaohongshu drafts`"},{name:"type",default:"image",help:"Draft type: image, video, article, audio"},{name:"execute",type:"bool",default:!1,help:"Actually delete the local draft. Default is dry-run verification only."}],columns:["status","id","type","message"],func:async(e,t)=>{const a=g(t.id),r=h(t.type),d=t.execute===!0;await p(e);const c=await b(e,r),o=x(c,a);if(!o)throw w(a,r,"xiaohongshu/draft-delete");const n=D(o.row,o.key,r,1);if(!d)return[{status:"dry-run",id:n.id,type:r,message:"Draft exists. Re-run with --execute to delete."}];const l=m[r],s=q(await e.evaluate(S(l,o.key)));if(!s?.ok)throw new i(s?.error||`Failed to delete draft ${n.id}`);if(!s.deleted)throw new i(`Draft ${n.id} still exists after delete`);return[{status:"deleted",id:n.id,type:r,message:"Draft deleted."}]}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as d,Strategy as s}from"@jackwener/opencli/registry";import{draftNotFound as f,ensureDraftDbPage as c,findDraftEntry as p,normalizeDraftId as m,normalizeDraftRecord as u,normalizeDraftType as l,readDraftEntries as y}from"./draft-utils.js";d({site:"xiaohongshu",name:"draft-open",access:"read",description:"读取一条小红书本地草稿详情",domain:"creator.xiaohongshu.com",strategy:s.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"id",positional:!0,required:!0,help:"Draft id returned by `opencli xiaohongshu drafts`"},{name:"type",default:"image",help:"Draft type: image, video, article, audio"}],columns:["id","type","title","updated_at","images","content"],func:async(r,i)=>{const o=m(i.id),e=l(i.type);await c(r);const n=await y(r,e),a=p(n,o);if(!a)throw f(o,e,"xiaohongshu/draft-open");const t=u(a.row,a.key,e,1,{contentLimit:500});return[{id:t.id,type:t.type,title:t.title,updated_at:t.updated_at,images:t.images,content:t.text_preview}]}});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import{ArgumentError as a,CommandExecutionError as c,EmptyResultError as p}from"@jackwener/opencli/errors";export const PUBLISH_URL="https://creator.xiaohongshu.com/publish/publish?from=menu_left&target=image",DRAFT_DB_NAME="draft-database-v1",STORE_NAME_MAP={image:"image-draft",video:"video-draft",article:"article-draft",audio:"audio-draft"};export function unwrapBrowserResult(e){if(e&&typeof e==="object"&&typeof e.session==="string"&&Object.prototype.hasOwnProperty.call(e,"data"))return e.data;return e}export function normalizeDraftType(e,{allowAll:t=!1}={}){const r=String(e??"image").trim().toLowerCase();if(t&&r==="all")return r;if(!STORE_NAME_MAP[r]){const o=t?"image, video, article, audio, all":Object.keys(STORE_NAME_MAP).join(", ");throw new a(`Unsupported draft type "${r}". Expected one of: ${o}`)}return r}export function normalizeDraftId(e){const t=String(e??"").trim();if(!t)throw new a("Draft id is required");return t}export function encodeDraftKey(e){const t=typeof e;if(t==="string")return`s:${e}`;if(t==="number")return`n:${String(e)}`;if(t==="boolean")return`b:${String(e)}`;try{return`j:${encodeURIComponent(JSON.stringify(e))}`}catch{return`s:${String(e)}`}}export function findDraftEntry(e,t){return e.find((r)=>encodeDraftKey(r?.key)===t)||null}export function normalizeDraftRecord(e,t,r,o,{contentLimit:d=80}={}){const n=e?.content??{},l=n?.contextStore?.liveContext??{},i=n?.draftStore??{},f=i?.title||l?.title||e?.title||e?.noteTitle||"",u=n?.editorContent?.text||n?.editorContent?.plainText||"",s=e?.updatedAt||e?.updateTime||e?.mtime||n?.updateTime||"",g=i?.imgList?.length||n?.noteImageConfig?.items?.length||n?.noteImageConfig?.imageList?.length||e?.images?.length||e?.imageList?.length||0;return{rank:o,id:encodeDraftKey(t),type:r,title:f||"(untitled)",updated_at:s?String(s):"",images:g,text_preview:String(u||"").replace(/\s+/g," ").trim().slice(0,d)}}export async function ensureDraftDbPage(e){await e.goto(PUBLISH_URL);await e.wait({time:2})}function m(e){return`
|
|
2
|
+
(async () => {
|
|
3
|
+
const openDb = () => new Promise((resolve, reject) => {
|
|
4
|
+
const req = indexedDB.open(${JSON.stringify(DRAFT_DB_NAME)});
|
|
5
|
+
req.onsuccess = () => resolve(req.result);
|
|
6
|
+
req.onerror = () => reject(req.error || new Error('failed to open IndexedDB'));
|
|
7
|
+
});
|
|
8
|
+
try {
|
|
9
|
+
const db = await openDb();
|
|
10
|
+
if (!db.objectStoreNames.contains(${JSON.stringify(e)})) {
|
|
11
|
+
db.close();
|
|
12
|
+
return { ok: true, entries: [] };
|
|
13
|
+
}
|
|
14
|
+
const tx = db.transaction(${JSON.stringify(e)}, 'readonly');
|
|
15
|
+
const store = tx.objectStore(${JSON.stringify(e)});
|
|
16
|
+
const allRows = await new Promise((resolve, reject) => {
|
|
17
|
+
const req = store.getAll();
|
|
18
|
+
req.onsuccess = () => resolve(req.result || []);
|
|
19
|
+
req.onerror = () => reject(req.error || new Error('failed to read drafts'));
|
|
20
|
+
});
|
|
21
|
+
const allKeys = await new Promise((resolve, reject) => {
|
|
22
|
+
if (!store.getAllKeys) return resolve([]);
|
|
23
|
+
const req = store.getAllKeys();
|
|
24
|
+
req.onsuccess = () => resolve(req.result || []);
|
|
25
|
+
req.onerror = () => reject(req.error || new Error('failed to read draft keys'));
|
|
26
|
+
});
|
|
27
|
+
db.close();
|
|
28
|
+
return {
|
|
29
|
+
ok: true,
|
|
30
|
+
entries: allRows.map((row, index) => ({ key: allKeys[index] ?? index, row })),
|
|
31
|
+
};
|
|
32
|
+
} catch (error) {
|
|
33
|
+
return { ok: false, error: String(error && error.message || error) };
|
|
34
|
+
}
|
|
35
|
+
})()
|
|
36
|
+
`}export async function readDraftEntries(e,t){const r=STORE_NAME_MAP[t],o=unwrapBrowserResult(await e.evaluate(m(r)));if(!o?.ok)throw new c(o?.error||`Failed to read ${t} drafts`);if(!Array.isArray(o.entries))throw new c(`Malformed ${t} draft payload`);return o.entries}export function draftNotFound(e,t,r){return new p(r,`Draft ${e} was not found in ${t} drafts. Run opencli xiaohongshu drafts --type ${t} to list current ids.`)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as o,Strategy as s}from"@jackwener/opencli/registry";import{ensureDraftDbPage as n,normalizeDraftRecord as m,normalizeDraftType as d,readDraftEntries as c}from"./draft-utils.js";export const draftsCommand=o({site:"xiaohongshu",name:"drafts",access:"read",description:"小红书本地草稿箱列表",domain:"creator.xiaohongshu.com",strategy:s.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"type",default:"image",help:"Draft type: image, video, article, audio"}],columns:["rank","id","type","title","updated_at","images","text_preview"],func:async(e,r)=>{const a=d(r.type);await n(e);return(await c(e,a)).map((t,i)=>m(t?.row,t?.key,a,i+1))}});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import{cli as Y,Strategy as Z}from"@jackwener/opencli/registry";import{ArgumentError as X,CommandExecutionError as P,EmptyResultError as $}from"@jackwener/opencli/errors";function f(q){const B=Number(q??20);if(!Number.isFinite(B)||!Number.isInteger(B))throw new X(`--limit must be a positive integer, got ${JSON.stringify(q)}`);if(B<1)throw new X(`--limit must be a positive integer, got ${B}`);return B}const h=`
|
|
2
|
+
(() => {
|
|
3
|
+
let pinia = null;
|
|
4
|
+
const probe = (el) => el?.__vue_app__?.config?.globalProperties?.$pinia ?? null;
|
|
5
|
+
pinia = probe(document.querySelector('#app'));
|
|
6
|
+
if (!pinia) {
|
|
7
|
+
// Some builds mount under a different root id; fall back to a full scan
|
|
8
|
+
// only when the standard mount node misses.
|
|
9
|
+
for (const el of document.querySelectorAll('*')) {
|
|
10
|
+
pinia = probe(el);
|
|
11
|
+
if (pinia) break;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
if (!pinia || !pinia._s) return { error: 'no_pinia' };
|
|
15
|
+
const store = pinia._s.get('feed');
|
|
16
|
+
if (!store) return { error: 'no_feed_store' };
|
|
17
|
+
const feeds = store.feeds;
|
|
18
|
+
if (!Array.isArray(feeds)) return { error: 'feeds_not_array' };
|
|
19
|
+
return {
|
|
20
|
+
items: feeds.map(entry => {
|
|
21
|
+
const card = entry?.noteCard ?? {};
|
|
22
|
+
return {
|
|
23
|
+
id: entry?.id ?? '',
|
|
24
|
+
title: card.displayTitle ?? '',
|
|
25
|
+
type: card.type ?? '',
|
|
26
|
+
// Live store exposes both user.nickname and user.nickName; prefer
|
|
27
|
+
// nickname (observed populated on xhs), fall back to nickName.
|
|
28
|
+
author: card.user?.nickname ?? card.user?.nickName ?? '',
|
|
29
|
+
likes: card.interactInfo?.likedCount ?? '',
|
|
30
|
+
// The note's signing token lives on the top-level entry. Do NOT read
|
|
31
|
+
// card.user.xsecToken — that is the author profile's token, not the
|
|
32
|
+
// note's.
|
|
33
|
+
xsecToken: entry?.xsecToken ?? '',
|
|
34
|
+
};
|
|
35
|
+
}),
|
|
36
|
+
};
|
|
37
|
+
})()
|
|
38
|
+
`;function M(q){return typeof q==="string"?q.trim():q==null?"":String(q).trim()}function I(q){if(q&&!Array.isArray(q)&&typeof q==="object"&&"session"in q&&"data"in q)return q.data;return q}export function buildFeedNoteUrl(q,B,z){const V=M(B),G=new URL(`https://${q}/explore/${encodeURIComponent(V)}`),O=M(z);if(!O)return G.toString();G.searchParams.set("xsec_token",O);G.searchParams.set("xsec_source","");return G.toString()}export async function runFeed(q,B,z){const V=f(B.limit);await q.goto(`https://${z}/explore`);await q.wait({time:2});const G=I(await q.evaluate(h));if(!G||typeof G!=="object")throw new P(`${z} feed: unexpected evaluate response`);if(G.error)throw new P(`${z} feed: ${G.error}`,`The SPA may still be hydrating; reload ${z}/explore and retry.`);if(!Array.isArray(G.items))throw new P(`${z} feed: unexpected items payload shape`);const O=[];for(const K of G.items){if(O.length>=V)break;if(!K||typeof K!=="object")throw new P(`${z} feed: malformed feed item`);const Q=M(K.id);if(!Q)throw new P(`${z} feed: feed item is missing note id`);const W=M(K.xsecToken);if(!W)throw new P(`${z} feed: feed item ${Q} is missing xsecToken; cannot build a signed drill-down URL`);O.push({id:Q,title:M(K.title),type:M(K.type),author:M(K.author),likes:M(K.likes),url:buildFeedNoteUrl(z,Q,W)})}if(O.length===0)throw new $(`${z}/feed`,"No feed items in the hydrated store.");return O}export const command=Y({site:"xiaohongshu",name:"feed",access:"read",description:"小红书首页推荐 Feed (reads hydrated Pinia store)",domain:"www.xiaohongshu.com",strategy:Z.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"limit",type:"int",default:20,help:"Number of items to return"}],columns:["id","title","author","likes","type","url"],func:async(q,B)=>runFeed(q,B,"www.xiaohongshu.com")});
|