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,209 @@
|
|
|
1
|
+
import{ArgumentError as m,AuthRequiredError as h,CommandExecutionError as s,EmptyResultError as i}from"@jackwener/opencli/errors";import{cli as b,Strategy as k}from"@jackwener/opencli/registry";const x="https://www.facebook.com/",a=50;function c(t){const n=Number(t);if(!Number.isInteger(n)||n<1||n>a)throw new m(`facebook feed --limit must be an integer between 1 and ${a}`);return n}function p(t){if(t&&typeof t==="object"&&"data"in t)return t.data;return t}function l(t){return`(() => {
|
|
2
|
+
const limit = ${t};
|
|
3
|
+
|
|
4
|
+
function clean(value) {
|
|
5
|
+
return String(value || '').replace(/\\s+/g, ' ').trim();
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function textOf(el) {
|
|
9
|
+
return clean(el && el.textContent);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function labelOf(el) {
|
|
13
|
+
return clean(el && el.getAttribute && el.getAttribute('aria-label'));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function isAuthPage() {
|
|
17
|
+
const path = window.location && window.location.pathname ? window.location.pathname : '';
|
|
18
|
+
const body = textOf(document.body);
|
|
19
|
+
return /^\\/(login|checkpoint)(\\/|$|\\.php)/.test(path)
|
|
20
|
+
|| /^(Log in to Facebook|Facebook登录|登录 Facebook)/i.test(body)
|
|
21
|
+
|| /You must log in to continue/i.test(body);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function isExplicitEmptyFeed() {
|
|
25
|
+
const body = textOf(document.body);
|
|
26
|
+
return /No posts available|Nothing to show|暂无动态|没有更多动态|还没有帖子/i.test(body);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function isSuggestionOrChrome(text) {
|
|
30
|
+
return /^(People you may know|People You May Know|可能认识的人?|你可能认识的人?)/i.test(text)
|
|
31
|
+
|| /^(Suggested for you|Suggested Groups|推荐小组|推荐内容)/i.test(text);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function isSponsored(text) {
|
|
35
|
+
return /(^|\\s)(Sponsored|赞助|广告)(\\s|$)/i.test(text);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function isActionText(text) {
|
|
39
|
+
return /^(Like|Comment|Share|Send|Follow|赞|评论|分享|发送|关注)$/i.test(text);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function isMetricText(text) {
|
|
43
|
+
return /^(All:|所有心情:)/i.test(text)
|
|
44
|
+
|| /\\b(likes?|reactions?|comments?|shares?)\\b/i.test(text)
|
|
45
|
+
|| /(条评论|次分享)$/.test(text);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function isTimestampText(text) {
|
|
49
|
+
return /^(\\d+\\s*(s|m|h|d|w|mo|yr|min|sec|second|minute|hour|day|week|month|year)s?|Just now|Yesterday|刚刚|昨天|\\d+小时|\\d+天)(\\s*[·•.])?$/i.test(text);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function postUrlFrom(root) {
|
|
53
|
+
const links = Array.from(root.querySelectorAll('a[href]'));
|
|
54
|
+
for (const link of links) {
|
|
55
|
+
const href = link.href || link.getAttribute('href') || '';
|
|
56
|
+
if (/\\/posts\\/|\\/permalink\\.php|\\/story\\.php|\\/photo\\/\\?fbid=|\\/groups\\/[^/]+\\/posts\\//i.test(href)) {
|
|
57
|
+
return href;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return '';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function actionKinds(root) {
|
|
64
|
+
const kinds = new Set();
|
|
65
|
+
for (const el of root.querySelectorAll('[aria-label]')) {
|
|
66
|
+
const label = labelOf(el);
|
|
67
|
+
if (/^(Like|赞)$/i.test(label)) kinds.add('like');
|
|
68
|
+
if (/^(Comment|评论)$/i.test(label)) kinds.add('comment');
|
|
69
|
+
if (/^(Share|分享)$/i.test(label)) kinds.add('share');
|
|
70
|
+
}
|
|
71
|
+
return kinds;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function visibleBlocks(root) {
|
|
75
|
+
const seen = new Set();
|
|
76
|
+
return Array.from(root.querySelectorAll('[dir="auto"]'))
|
|
77
|
+
.map(textOf)
|
|
78
|
+
.filter((text) => {
|
|
79
|
+
if (!text || text.length > 600 || seen.has(text)) return false;
|
|
80
|
+
seen.add(text);
|
|
81
|
+
return true;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function findAuthor(root) {
|
|
86
|
+
const links = [
|
|
87
|
+
root.querySelector('h2 a[href], h3 a[href], h4 a[href], strong a[href]'),
|
|
88
|
+
...Array.from(root.querySelectorAll('a[role="link"][href]')),
|
|
89
|
+
].filter(Boolean);
|
|
90
|
+
for (const link of links) {
|
|
91
|
+
const text = textOf(link);
|
|
92
|
+
const href = link.href || link.getAttribute('href') || '';
|
|
93
|
+
if (text.length > 1 && text.length <= 80
|
|
94
|
+
&& !isActionText(text)
|
|
95
|
+
&& !isMetricText(text)
|
|
96
|
+
&& !isTimestampText(text)
|
|
97
|
+
&& !/\\/groups\\/|\\/watch\\/|\\/reel\\/|\\/events\\/|\\/friends\\//i.test(href)) {
|
|
98
|
+
return text;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return '';
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function contentBlocks(root, author) {
|
|
105
|
+
return visibleBlocks(root).filter((text) => {
|
|
106
|
+
if (text === author) return false;
|
|
107
|
+
if (text.length <= 10) return false;
|
|
108
|
+
if (isSuggestionOrChrome(text) || isSponsored(text)) return false;
|
|
109
|
+
if (isActionText(text) || isMetricText(text) || isTimestampText(text)) return false;
|
|
110
|
+
if (/^(See more|查看更多|更多)$/i.test(text)) return false;
|
|
111
|
+
return true;
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function extractPost(root, index) {
|
|
116
|
+
const fullText = textOf(root);
|
|
117
|
+
if (!fullText || isSuggestionOrChrome(fullText) || isSponsored(fullText)) return null;
|
|
118
|
+
|
|
119
|
+
const author = findAuthor(root);
|
|
120
|
+
const blocks = contentBlocks(root, author);
|
|
121
|
+
const content = clean(blocks.join(' '));
|
|
122
|
+
const postUrl = postUrlFrom(root);
|
|
123
|
+
const kinds = actionKinds(root);
|
|
124
|
+
|
|
125
|
+
if (!author && !content) return null;
|
|
126
|
+
if (!content && !postUrl && kinds.size < 2) return null;
|
|
127
|
+
|
|
128
|
+
const likesMatch = fullText.match(/所有心情:\\s*(\\d[\\d,.\\s万亿KMk]*)/)
|
|
129
|
+
|| fullText.match(/All:\\s*(\\d[\\d,.KMk]*)/)
|
|
130
|
+
|| fullText.match(/(\\d[\\d,.KMk]*)\\s*(?:likes?|reactions?)/i);
|
|
131
|
+
const commentsMatch = fullText.match(/([\\d,.]+\\s*[万亿]?)\\s*条评论/)
|
|
132
|
+
|| fullText.match(/(\\d[\\d,.KMk]*)\\s*comments?/i);
|
|
133
|
+
const sharesMatch = fullText.match(/([\\d,.]+\\s*[万亿]?)\\s*次分享/)
|
|
134
|
+
|| fullText.match(/(\\d[\\d,.KMk]*)\\s*shares?/i);
|
|
135
|
+
|
|
136
|
+
return {
|
|
137
|
+
index,
|
|
138
|
+
author: author.substring(0, 50),
|
|
139
|
+
content: content.substring(0, 120),
|
|
140
|
+
likes: likesMatch ? clean(likesMatch[1]) : '-',
|
|
141
|
+
comments: commentsMatch ? clean(commentsMatch[1]) : '-',
|
|
142
|
+
shares: sharesMatch ? clean(sharesMatch[1]) : '-',
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function primaryContainers() {
|
|
147
|
+
return Array.from(document.querySelectorAll('[role="article"]'))
|
|
148
|
+
.filter((el) => textOf(el).length > 30);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function fallbackContainers() {
|
|
152
|
+
const main = document.querySelector('[role="main"]');
|
|
153
|
+
if (!main) return [];
|
|
154
|
+
const buttons = Array.from(main.querySelectorAll('[aria-label="Like"], [aria-label="赞"], [aria-label="Comment"], [aria-label="评论"], [aria-label="Share"], [aria-label="分享"]'));
|
|
155
|
+
const seen = new WeakSet();
|
|
156
|
+
const containers = [];
|
|
157
|
+
for (const button of buttons) {
|
|
158
|
+
let node = button.parentElement;
|
|
159
|
+
for (let depth = 0; depth < 16 && node && node !== main && node !== document.body; depth += 1, node = node.parentElement) {
|
|
160
|
+
const text = textOf(node);
|
|
161
|
+
const kinds = actionKinds(node);
|
|
162
|
+
const blocks = visibleBlocks(node);
|
|
163
|
+
const hasPostEvidence = Boolean(postUrlFrom(node)) || blocks.some((block) => block.length > 20 && !isActionText(block) && !isMetricText(block));
|
|
164
|
+
if (text.length >= 80 && kinds.has('like') && (kinds.has('comment') || kinds.has('share')) && hasPostEvidence) {
|
|
165
|
+
if (!seen.has(node)) {
|
|
166
|
+
seen.add(node);
|
|
167
|
+
containers.push(node);
|
|
168
|
+
}
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return containers;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function dedupe(containers) {
|
|
177
|
+
const seen = new Set();
|
|
178
|
+
const result = [];
|
|
179
|
+
for (const node of containers) {
|
|
180
|
+
const key = postUrlFrom(node) || contentBlocks(node, findAuthor(node)).join('|').substring(0, 200);
|
|
181
|
+
if (!key || seen.has(key)) continue;
|
|
182
|
+
seen.add(key);
|
|
183
|
+
result.push(node);
|
|
184
|
+
}
|
|
185
|
+
return result;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (isAuthPage()) return { status: 'auth', rows: [], diagnostics: {} };
|
|
189
|
+
|
|
190
|
+
const primary = primaryContainers();
|
|
191
|
+
const combined = dedupe([...primary, ...fallbackContainers()]);
|
|
192
|
+
const rows = [];
|
|
193
|
+
for (const container of combined) {
|
|
194
|
+
const row = extractPost(container, rows.length + 1);
|
|
195
|
+
if (row) rows.push(row);
|
|
196
|
+
if (rows.length >= limit) break;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
return {
|
|
200
|
+
status: rows.length ? 'ok' : (isExplicitEmptyFeed() ? 'empty' : 'no_rows'),
|
|
201
|
+
rows,
|
|
202
|
+
diagnostics: {
|
|
203
|
+
articleCount: document.querySelectorAll('[role="article"]').length,
|
|
204
|
+
primaryCount: primary.length,
|
|
205
|
+
fallbackActionCount: document.querySelectorAll('[role="main"] [aria-label="Like"], [role="main"] [aria-label="赞"], [role="main"] [aria-label="Comment"], [role="main"] [aria-label="评论"]').length,
|
|
206
|
+
mainTextLength: textOf(document.querySelector('[role="main"]')).length,
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
})()`}async function u(t,n){const d=c(n.limit??10);try{await t.goto(x,{settleMs:4000})}catch(o){throw new s(`Failed to navigate to facebook feed: ${o instanceof Error?o.message:o}`,"Check that facebook.com is reachable and the browser extension is connected.")}let e;try{e=p(await t.evaluate(l(d)))}catch(o){throw new s(`Failed to read facebook feed: ${o instanceof Error?o.message:o}`,"Facebook may not have rendered or the feed markup may have changed.")}if(!e||typeof e!=="object"||!Array.isArray(e.rows))throw new s("facebook feed returned malformed extraction payload");if(e.status==="auth")throw new h("www.facebook.com","Open Chrome and log in to Facebook before retrying.");if(e.rows.length>0)return e.rows;if(e.status==="empty")throw new i("facebook feed","Facebook did not show any feed posts for this account.");const r=e.diagnostics||{};if(r.articleCount||r.fallbackActionCount||r.mainTextLength>200)throw new s("facebook feed page rendered but no feed rows could be extracted",`Diagnostics: articles=${r.articleCount||0}, actions=${r.fallbackActionCount||0}, mainTextLength=${r.mainTextLength||0}.`);throw new i("facebook feed","No Facebook feed content was visible in the current browser session.")}const f={site:"facebook",name:"feed",access:"read",description:"Get your Facebook news feed",domain:"www.facebook.com",strategy:k.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"limit",type:"int",default:10,help:"Number of posts"}],columns:["index","author","content","likes","comments","shares"],func:u};b(f);export const __test__={buildFeedExtractScript:l,command:f,getFacebookFeed:u,requireLimit:c};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{cli as e}from"@jackwener/opencli/registry";e({site:"facebook",name:"friends",access:"read",description:"Get Facebook friend suggestions",domain:"www.facebook.com",args:[{name:"limit",type:"int",default:10,help:"Number of friend suggestions"}],columns:["index","name","mutual"],pipeline:[{navigate:{url:"https://www.facebook.com/friends",settleMs:3000}},{evaluate:`(() => {
|
|
2
|
+
const limit = \${{ args.limit }};
|
|
3
|
+
const items = document.querySelectorAll('[role="listitem"]');
|
|
4
|
+
return Array.from(items)
|
|
5
|
+
.slice(0, limit)
|
|
6
|
+
.map((el, i) => {
|
|
7
|
+
const text = el.textContent.trim().replace(/\\s+/g, ' ');
|
|
8
|
+
// Extract mutual info if present (before name extraction to avoid pollution)
|
|
9
|
+
const mutualMatch = text.match(/([\\d,]+)\\s*位.*(?:关注|共同|mutual)/);
|
|
10
|
+
// Extract name: remove mutual info, action buttons, etc.
|
|
11
|
+
let name = text
|
|
12
|
+
.replace(/[\\d,]+\\s*位.*(?:关注了|共同好友|mutual friends?)/, '')
|
|
13
|
+
.replace(/加好友.*/, '').replace(/Add [Ff]riend.*/, '')
|
|
14
|
+
.replace(/移除$/, '').replace(/Remove$/, '')
|
|
15
|
+
.trim();
|
|
16
|
+
return {
|
|
17
|
+
index: i + 1,
|
|
18
|
+
name: name.substring(0, 50),
|
|
19
|
+
mutual: mutualMatch ? mutualMatch[1] : '-',
|
|
20
|
+
};
|
|
21
|
+
})
|
|
22
|
+
.filter(item => item.name.length > 0);
|
|
23
|
+
})()
|
|
24
|
+
`}]});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import{cli as e}from"@jackwener/opencli/registry";e({site:"facebook",name:"groups",access:"read",description:"List your Facebook groups",domain:"www.facebook.com",args:[{name:"limit",type:"int",default:20,help:"Number of groups"}],columns:["index","name","last_post","url"],pipeline:[{navigate:{url:"https://www.facebook.com/groups/feed/",settleMs:3000}},{evaluate:`(() => {
|
|
2
|
+
const limit = \${{ args.limit }};
|
|
3
|
+
const links = Array.from(document.querySelectorAll('a'))
|
|
4
|
+
.filter(a => {
|
|
5
|
+
const href = a.href || '';
|
|
6
|
+
return href.includes('/groups/') &&
|
|
7
|
+
!href.includes('/feed') &&
|
|
8
|
+
!href.includes('/discover') &&
|
|
9
|
+
!href.includes('/joins') &&
|
|
10
|
+
!href.includes('category=create') &&
|
|
11
|
+
a.textContent.trim().length > 2;
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// Deduplicate by href
|
|
15
|
+
const seen = new Set();
|
|
16
|
+
const groups = [];
|
|
17
|
+
for (const a of links) {
|
|
18
|
+
const href = a.href.split('?')[0];
|
|
19
|
+
if (seen.has(href)) continue;
|
|
20
|
+
seen.add(href);
|
|
21
|
+
const raw = a.textContent.trim().replace(/\\s+/g, ' ');
|
|
22
|
+
// Split name from "上次发帖" info
|
|
23
|
+
const parts = raw.split(/上次发帖|Last post/);
|
|
24
|
+
groups.push({
|
|
25
|
+
name: (parts[0] || '').trim().substring(0, 60),
|
|
26
|
+
last_post: parts[1] ? parts[1].replace(/^[::]/, '').trim() : '-',
|
|
27
|
+
url: href,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return groups.slice(0, limit).map((g, i) => ({ index: i + 1, ...g }));
|
|
31
|
+
})()
|
|
32
|
+
`}]});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import{cli as t}from"@jackwener/opencli/registry";t({site:"facebook",name:"join-group",access:"write",description:"Join a Facebook group",domain:"www.facebook.com",args:[{name:"group",required:!0,positional:!0,help:"Group ID or URL path (e.g. '1876150192925481' or group name)"}],columns:["status","group"],pipeline:[{navigate:{url:"https://www.facebook.com/groups/${{ args.group }}",settleMs:3000}},{evaluate:`(async () => {
|
|
2
|
+
const group = \${{ args.group | json }};
|
|
3
|
+
const groupName = document.querySelector('h1')?.textContent?.trim() || group;
|
|
4
|
+
|
|
5
|
+
// Find "Join Group" button
|
|
6
|
+
const buttons = Array.from(document.querySelectorAll('[role="button"]'));
|
|
7
|
+
const joinBtn = buttons.find(b => {
|
|
8
|
+
const text = b.textContent.trim();
|
|
9
|
+
return text === '加入小组' || text === 'Join group' || text === 'Join Group';
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
if (!joinBtn) {
|
|
13
|
+
const isMember = buttons.some(b => {
|
|
14
|
+
const t = b.textContent.trim();
|
|
15
|
+
return t === '已加入' || t === 'Joined' || t === '成员' || t === 'Member';
|
|
16
|
+
});
|
|
17
|
+
if (isMember) return [{ status: 'Already a member', group: groupName }];
|
|
18
|
+
return [{ status: 'Join button not found', group: groupName }];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
joinBtn.click();
|
|
22
|
+
await new Promise(r => setTimeout(r, 1500));
|
|
23
|
+
return [{ status: 'Join request sent', group: groupName }];
|
|
24
|
+
})()
|
|
25
|
+
`}]});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import{ArgumentError as Z,AuthRequiredError as y,CommandExecutionError as V}from"@jackwener/opencli/errors";import{cli as N,Strategy as R}from"@jackwener/opencli/registry";const $="data-pp-fb-like";function U(){return`(() => {
|
|
2
|
+
const path = location.pathname || '';
|
|
3
|
+
if (/^\\/(login|checkpoint)(\\/|$|\\.php)/.test(path)) return { auth: true, detail: 'on login/checkpoint page' };
|
|
4
|
+
// A permalink often renders as a modal dialog over the feed. Scope to the
|
|
5
|
+
// dialog so we don't grab a background feed post's Like button.
|
|
6
|
+
const dialog = document.querySelector('[role="dialog"]');
|
|
7
|
+
const art = (dialog && dialog.querySelector('div[role="article"]'))
|
|
8
|
+
|| dialog
|
|
9
|
+
|| document.querySelector('div[role="article"]');
|
|
10
|
+
if (!art) return { notfound: true, detail: 'no post found on page' };
|
|
11
|
+
// Action buttons = focusable role=button carrying a css-img icon, not part
|
|
12
|
+
// of the reaction-count toolbar. The first one is Like.
|
|
13
|
+
const btns = [...art.querySelectorAll('[role="button"][tabindex="0"]')]
|
|
14
|
+
.filter(b => !b.closest('[role="toolbar"]') && b.querySelector('i[data-visualcompletion="css-img"]'));
|
|
15
|
+
const like = btns[0];
|
|
16
|
+
if (!like) return { notfound: true, detail: 'like button not located' };
|
|
17
|
+
like.setAttribute(${JSON.stringify($)}, '1');
|
|
18
|
+
like.scrollIntoView({ block: 'center' });
|
|
19
|
+
const icon = like.querySelector('i[data-visualcompletion="css-img"]');
|
|
20
|
+
const y = parseFloat((getComputedStyle(icon).backgroundPosition.split(' ')[1] || '0').replace('px','')) || 0;
|
|
21
|
+
return { y, label: like.getAttribute('aria-label') || '' };
|
|
22
|
+
})()`}function G(){return`(() => {
|
|
23
|
+
const like = document.querySelector('[${$}="1"]');
|
|
24
|
+
if (!like) return null;
|
|
25
|
+
const icon = like.querySelector('i[data-visualcompletion="css-img"]');
|
|
26
|
+
if (!icon) return null;
|
|
27
|
+
const y = parseFloat((getComputedStyle(icon).backgroundPosition.split(' ')[1] || '0').replace('px','')) || 0;
|
|
28
|
+
return { y, label: like.getAttribute('aria-label') || '' };
|
|
29
|
+
})()`}async function v(z,O,H){for(let J=0;J<H;J++){await z.click(`[${$}="1"]`);await z.wait(1);const M=await z.evaluate(G());if(M&&M.y!==O)return M}return null}N({site:"facebook",name:"like",access:"write",description:"Like a Facebook post (ends in the liked state; no-op if already liked). Pass the post URL. Reacts as a genuine like from your logged-in account — use it to engage with content you actually mean to endorse.",domain:"facebook.com",strategy:R.COOKIE,browser:!0,args:[{name:"url",type:"string",required:!0,positional:!0,help:"Post URL (e.g. https://www.facebook.com/<user>/posts/<id> or a permalink)"},{name:"remove",type:"bool",default:!1,help:"Remove your like instead (end in the un-liked state)"}],columns:["status","action","url","message"],func:async(z,O)=>{if(!z)throw new V("Browser session required");const H=String(O.url??"").trim();if(!H)throw new Z("Post URL is required.");let J;try{J=new URL(H)}catch{throw new Z(`Invalid post URL: ${H}`)}if(!/facebook\.com$/.test(J.hostname)&&!J.hostname.endsWith(".facebook.com"))throw new Z("URL must be a facebook.com post URL.");const M=O.remove===!0;await z.goto(H,{waitUntil:"none"});let B=null;for(let X=0;X<15;X++){await z.wait(1);B=await z.evaluate(U());if(B?.auth)throw new y("www.facebook.com",`Facebook ${B.detail} — not signed in`);if(typeof B?.y==="number")break}if(typeof B?.y!=="number")throw new V(`Could not act on this post: ${B?.detail||"like button never appeared"}.`);const P=await v(z,B.y,5);if(!P)throw new V("Like did not register — Facebook ignored the click (post may be unavailable or reactions disabled).");const q=Math.max(B.y,P.y),D=P.y===q,j=B.y===q,W=!M;let Q;if(D===W)Q=W?j?"already-liked":"liked":"unliked";else{if(!await v(z,P.y,3))throw new V("Could not settle the reaction to the desired state (second toggle ignored).");Q=W?"already-liked":"already-unliked"}return[{status:"success",action:Q,url:H,message:{liked:"Post liked.","already-liked":"Post was already liked (left liked).",unliked:"Like removed.","already-unliked":"Post was not liked (left un-liked)."}[Q]||"Reaction updated."}]}});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import{cli as l,Strategy as c}from"@jackwener/opencli/registry";import{ArgumentError as u,AuthRequiredError as m,CommandExecutionError as p,EmptyResultError as b}from"@jackwener/opencli/errors";function r(e){const t=Number(e??20);if(!Number.isInteger(t)||t<=0)throw new u("facebook marketplace-inbox --limit must be a positive integer");return Math.min(t,100)}l({site:"facebook",name:"marketplace-inbox",access:"read",description:"List recent Facebook Marketplace buyer/seller conversations",domain:"www.facebook.com",strategy:c.COOKIE,args:[{name:"limit",type:"int",default:20,help:"Number of conversations to return"}],columns:["index","buyer","listing","snippet","time","unread"],func:async(e,t)=>{if(!e)throw new p("Browser session required for facebook marketplace-inbox");const s=r(t.limit);await e.goto("https://www.facebook.com/marketplace/inbox/");await e.wait(4);const n=await e.evaluate(String.raw`(() => {
|
|
2
|
+
const clean = (s) => String(s || '').replace(/[\u00a0\u202f]/g, ' ').replace(/\s+/g, ' ').trim();
|
|
3
|
+
const timeRe = /^(?:\d{1,2}:\d{2}\s?(?:AM|PM|am|pm|上午|下午)?|Mon|Tue|Wed|Thu|Fri|Sat|Sun|Today|Yesterday|\d+[mhdw]|\d+\s*(?:min|h|d|w))$/;
|
|
4
|
+
const text = document.body?.innerText || '';
|
|
5
|
+
if (/log in|sign in/i.test(text) && !/Marketplace/i.test(text)) {
|
|
6
|
+
return { authRequired: true, rows: [] };
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const lines = text.split(/\n+/).map(clean).filter(Boolean);
|
|
10
|
+
const out = [];
|
|
11
|
+
const seen = new Set();
|
|
12
|
+
const skipBuyer = /^(Marketplace|Browse all|Notifications|Inbox|Marketplace access|Buying|Selling|Create new listing|Create multiple listings|Location|Categories|Vehicles|Property Rentals|All|Pending payment|Paid|To be shipped|Shipped|Cash on delivery|Completed|Filter by label)$/i;
|
|
13
|
+
for (let i = 0; i < lines.length - 2; i += 1) {
|
|
14
|
+
const buyer = lines[i];
|
|
15
|
+
const meta = lines[i + 1];
|
|
16
|
+
if (skipBuyer.test(buyer) || !/^·\s+/.test(meta)) continue;
|
|
17
|
+
const listing = meta.replace(/^·\s*/, '');
|
|
18
|
+
if (!listing || /^Within\b/i.test(listing)) continue;
|
|
19
|
+
const snippet = lines[i + 2] || '';
|
|
20
|
+
const time = timeRe.test(lines[i + 3] || '') ? lines[i + 3] : '';
|
|
21
|
+
const key = buyer + '|' + listing;
|
|
22
|
+
if (seen.has(key)) continue;
|
|
23
|
+
seen.add(key);
|
|
24
|
+
const nearby = lines.slice(Math.max(0, i - 2), i + 5).join(' ');
|
|
25
|
+
out.push({
|
|
26
|
+
buyer,
|
|
27
|
+
listing,
|
|
28
|
+
snippet,
|
|
29
|
+
time,
|
|
30
|
+
unread: /Unread/i.test(nearby),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return { authRequired: false, rows: out };
|
|
34
|
+
})()`);if(n?.authRequired)throw new m("facebook.com","Facebook Marketplace inbox requires an active signed-in Facebook session.");const o=Array.isArray(n?.rows)?n.rows:[];if(o.length===0)throw new b("facebook marketplace-inbox","No Marketplace inbox conversations were visible. Check that Marketplace inbox is available for this account.");return o.slice(0,s).map((i,a)=>({index:a+1,buyer:i.buyer||"",listing:i.listing||"",snippet:i.snippet||"",time:i.time||"",unread:Boolean(i.unread)}))}});export const __test__={normalizeLimit:r};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import{cli as r,Strategy as c}from"@jackwener/opencli/registry";import{ArgumentError as u,AuthRequiredError as d,CommandExecutionError as w,EmptyResultError as k}from"@jackwener/opencli/errors";function l(e){const t=Number(e??20);if(!Number.isInteger(t)||t<=0)throw new u("facebook marketplace-listings --limit must be a positive integer");return Math.min(t,100)}r({site:"facebook",name:"marketplace-listings",access:"read",description:"List your Facebook Marketplace seller listings",domain:"www.facebook.com",strategy:c.COOKIE,args:[{name:"limit",type:"int",default:20,help:"Number of listings to return"}],columns:["index","title","price","status","listed","clicks","actions"],func:async(e,t)=>{if(!e)throw new w("Browser session required for facebook marketplace-listings");const o=l(t.limit);await e.goto("https://www.facebook.com/marketplace/you/selling/");await e.wait(4);const s=await e.evaluate(String.raw`(() => {
|
|
2
|
+
const clean = (s) => String(s || '').replace(/\u00a0/g, ' ').replace(/\s+/g, ' ').trim();
|
|
3
|
+
const allText = document.body?.innerText || '';
|
|
4
|
+
if (/log in|sign in/i.test(allText) && !/Marketplace/i.test(allText)) {
|
|
5
|
+
return { authRequired: true, rows: [] };
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const lines = allText.split(/\n+/).map(clean).filter(Boolean);
|
|
9
|
+
const seen = new Set();
|
|
10
|
+
const out = [];
|
|
11
|
+
for (let i = 1; i < lines.length; i += 1) {
|
|
12
|
+
if (!/^(?:CA\$|\$)\s*\d+/.test(lines[i])) continue;
|
|
13
|
+
const title = lines[i - 1];
|
|
14
|
+
if (!title || /^(Hide|All listings|Needs attention|Marketplace|Selling)$/i.test(title)) continue;
|
|
15
|
+
if (seen.has(title)) continue;
|
|
16
|
+
seen.add(title);
|
|
17
|
+
const windowLines = lines.slice(i, i + 12);
|
|
18
|
+
const status = windowLines.find((line) => /^(Active|Sold|Pending|Draft)$/i.test(line)) || '';
|
|
19
|
+
const listed = windowLines.find((line) => /Listed on\b/i.test(line))?.replace(/^·\s*/, '') || '';
|
|
20
|
+
const clickLine = windowLines.find((line) => /clicks? on listing/i.test(line)) || '';
|
|
21
|
+
const clickMatch = clickLine.match(/([\d,.]+)\s+clicks? on listing/i);
|
|
22
|
+
const actions = windowLines.filter((line) => /^(Mark as sold|Mark as available|Relist this item|Share|Boost listing)$/i.test(line));
|
|
23
|
+
out.push({
|
|
24
|
+
title,
|
|
25
|
+
price: lines[i],
|
|
26
|
+
status,
|
|
27
|
+
listed,
|
|
28
|
+
clicks: clickMatch ? clickMatch[1] : '',
|
|
29
|
+
actions,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return { authRequired: false, rows: out };
|
|
33
|
+
})()`);if(s?.authRequired)throw new d("facebook.com","Facebook Marketplace seller listings require an active signed-in Facebook session.");const n=Array.isArray(s?.rows)?s.rows:[];if(n.length===0)throw new k("facebook marketplace-listings","No seller listings were visible. Check that Marketplace selling is available for this account.");return n.slice(0,o).map((i,a)=>({index:a+1,title:i.title||"",price:i.price||"",status:i.status||"",listed:i.listed||"",clicks:i.clicks||"",actions:Array.isArray(i.actions)?i.actions.join(", "):String(i.actions||"")}))}});export const __test__={normalizeLimit:l};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{cli as e}from"@jackwener/opencli/registry";e({site:"facebook",name:"memories",access:"read",description:"Get your Facebook memories (On This Day)",domain:"www.facebook.com",args:[{name:"limit",type:"int",default:10,help:"Number of memories"}],columns:["index","source","content","time"],pipeline:[{navigate:{url:"https://www.facebook.com/onthisday",settleMs:4000}},{evaluate:`(() => {
|
|
2
|
+
const limit = \${{ args.limit }};
|
|
3
|
+
const articles = document.querySelectorAll('[role="article"]');
|
|
4
|
+
return Array.from(articles)
|
|
5
|
+
.slice(0, limit)
|
|
6
|
+
.map((el, i) => {
|
|
7
|
+
const headerLink = el.querySelector('h2 a, h3 a, h4 a, strong a');
|
|
8
|
+
const spans = Array.from(el.querySelectorAll('div[dir="auto"]'))
|
|
9
|
+
.map(s => s.textContent.trim())
|
|
10
|
+
.filter(t => t.length > 5 && t.length < 500);
|
|
11
|
+
const timeEl = el.querySelector('a[href*="/posts/"] span, a[href*="story_fbid"] span');
|
|
12
|
+
return {
|
|
13
|
+
index: i + 1,
|
|
14
|
+
source: headerLink ? headerLink.textContent.trim().substring(0, 50) : '-',
|
|
15
|
+
content: (spans[0] || '').replace(/\\n/g, ' ').substring(0, 150),
|
|
16
|
+
time: timeEl ? timeEl.textContent.trim() : '-',
|
|
17
|
+
};
|
|
18
|
+
})
|
|
19
|
+
.filter(item => item.content.length > 0 || item.source !== '-');
|
|
20
|
+
})()
|
|
21
|
+
`}]});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import{cli as H,Strategy as L}from"@jackwener/opencli/registry";import{ArgumentError as M,AuthRequiredError as k,CommandExecutionError as C,EmptyResultError as O}from"@jackwener/opencli/errors";export const FB_HOST="https://www.facebook.com",NOTIFICATIONS_LIMIT_DEFAULT=15,NOTIFICATIONS_LIMIT_MAX=100,MARK_AS_READ_PREFIXES=["标记为已读,","Mark as read, ","Mark as Read, ","Marquer comme lu, ","Marcar como leído, ","既読にする, "],UNREAD_BADGE_LABELS=["未读","Unread","No leído","未読"];export function normalizeNotificationsLimit(V){if(V===void 0||V===null||V==="")return NOTIFICATIONS_LIMIT_DEFAULT;const Z=typeof V==="number"?V:Number(V);if(!Number.isFinite(Z)||!Number.isInteger(Z)||Z<1||Z>NOTIFICATIONS_LIMIT_MAX)throw new M(`--limit must be a positive integer in [1, ${NOTIFICATIONS_LIMIT_MAX}], got ${JSON.stringify(V)}`);return Z}export function stripMarkAsReadPrefix(V,Z){if(!V)return null;const W=String(V).trim();if(!W)return null;for(let J=0;J<Z.length;J+=1){const Y=Z[J];if(W.startsWith(Y))return W.slice(Y.length).trim()}return null}export function stripAnchorChrome(V,Z,W){if(!V)return"";let J=String(V).trim();for(let Y=0;Y<W.length;Y+=1){const $=W[Y];if(J.startsWith($)){J=J.slice($.length).trim();break}}if(Z){const Y=String(Z).trim();if(Y&&J.endsWith(Y))J=J.slice(0,J.length-Y.length).trim()}J=J.replace(/[.。]+$/,"").trim();return J}export function parseNotifQuery(V,Z){const W={notif_id:null,notif_type:null};if(!V)return W;let J;try{J=new URL(V,Z)}catch(Y){return W}W.notif_id=J.searchParams.get("notif_id")||null;W.notif_type=J.searchParams.get("notif_t")||null;return W}export function isFacebookAuthRedirectPath(V){return/^\/(?:login|checkpoint)(?:\.php)?(?:\/|$)/i.test(String(V||""))}export function extractNotificationRowsFromDoc(V,Z,W){const J=[],Y=V.querySelectorAll('[role="listitem"]');for(let $=0;$<Y.length&&J.length<Z;$+=1){const Q=Y[$],G=Q.querySelector("a[href]");if(!G)continue;const P=G.href||G.getAttribute("href")||"";if(!P)continue;const U=Q.querySelector("abbr"),B=U?(U.textContent||"").trim()||null:null;let v=!1;const X=Q.querySelectorAll("div");for(let q=0;q<X.length;q+=1){const z=(X[q].textContent||"").trim();if(W.unreadBadges.indexOf(z)!==-1){v=!0;break}}if(!v){const q=(G.textContent||"").trim();for(let z=0;z<W.unreadBadges.length;z+=1)if(q.startsWith(W.unreadBadges[z])){v=!0;break}}let K=null;const j=Q.querySelectorAll("[aria-label]");for(let q=0;q<j.length;q+=1){const z=j[q].getAttribute("aria-label"),y=W.stripMark(z,W.markPrefixes);if(y!==null){K=y.replace(/[.。]+$/,"").trim()||null;break}}if(!K)K=W.stripChrome(G.textContent||"",B,W.unreadBadges)||null;if(!K)continue;const{notif_id:D,notif_type:R}=W.parseQuery(P,W.fbHost);J.push({index:J.length+1,unread:v,text:K,time:B,url:P,notif_id:D,notif_type:R})}return J}export function buildNotificationsScript(V){return`
|
|
2
|
+
(async () => {
|
|
3
|
+
const FB_HOST = ${JSON.stringify(FB_HOST)};
|
|
4
|
+
const MARK_AS_READ_PREFIXES = ${JSON.stringify(MARK_AS_READ_PREFIXES)};
|
|
5
|
+
const UNREAD_BADGE_LABELS = ${JSON.stringify(UNREAD_BADGE_LABELS)};
|
|
6
|
+
${isFacebookAuthRedirectPath.toString()}
|
|
7
|
+
if (isFacebookAuthRedirectPath(window.location.pathname || '')) {
|
|
8
|
+
throw new Error('AUTH_REQUIRED: facebook.com redirected to login');
|
|
9
|
+
}
|
|
10
|
+
${stripMarkAsReadPrefix.toString()}
|
|
11
|
+
${stripAnchorChrome.toString()}
|
|
12
|
+
${parseNotifQuery.toString()}
|
|
13
|
+
${extractNotificationRowsFromDoc.toString()}
|
|
14
|
+
// Wait briefly for [role="listitem"] rows to render in case the SPA
|
|
15
|
+
// is still hydrating. 8s ceiling keeps a slow network from hanging
|
|
16
|
+
// the command — empty list after that surfaces as EmptyResultError
|
|
17
|
+
// on the Node side.
|
|
18
|
+
const start = Date.now();
|
|
19
|
+
while (document.querySelectorAll('[role="listitem"]').length === 0 && Date.now() - start < 8000) {
|
|
20
|
+
await new Promise(function(r) { setTimeout(r, 200); });
|
|
21
|
+
}
|
|
22
|
+
return extractNotificationRowsFromDoc(document, ${JSON.stringify(V)}, {
|
|
23
|
+
stripMark: stripMarkAsReadPrefix,
|
|
24
|
+
stripChrome: stripAnchorChrome,
|
|
25
|
+
parseQuery: parseNotifQuery,
|
|
26
|
+
fbHost: FB_HOST,
|
|
27
|
+
markPrefixes: MARK_AS_READ_PREFIXES,
|
|
28
|
+
unreadBadges: UNREAD_BADGE_LABELS,
|
|
29
|
+
});
|
|
30
|
+
})()
|
|
31
|
+
`}async function F(V,Z){const W=normalizeNotificationsLimit(Z.limit);try{await V.goto(`${FB_HOST}/notifications`,{waitUntil:"load",settleMs:3000})}catch(Y){const $=Y instanceof Error?Y.message:String(Y);throw new C(`Failed to navigate to facebook notifications: ${$}`,"facebook.com may be unreachable")}let J;try{J=await V.evaluate(buildNotificationsScript(W))}catch(Y){const $=Y instanceof Error?Y.message:String(Y);if(/AUTH_REQUIRED/i.test($))throw new k("facebook.com","Open Chrome and log in to Facebook before retrying");throw new C(`Failed to read facebook notifications: ${$}`,"facebook.com page may not have rendered or markup may have changed")}if(!Array.isArray(J)||J.length===0)throw new O("facebook/notifications","No notifications found — login session may have expired or you have no recent notifications");return J}export const notificationsCommand=H({site:"facebook",name:"notifications",access:"read",description:"Get recent Facebook notifications (含 unread / time / url / notif_id / notif_type 列)",domain:"www.facebook.com",strategy:L.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"limit",type:"int",default:NOTIFICATIONS_LIMIT_DEFAULT,help:`Number of notifications (1-${NOTIFICATIONS_LIMIT_MAX})`}],columns:["index","unread","text","time","url","notif_id","notif_type"],func:F}),__test__={buildNotificationsScript};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import*as v from"node:fs";import*as H from"node:path";import{ArgumentError as V,AuthRequiredError as A,CommandExecutionError as $}from"@jackwener/opencli/errors";import{cli as N,Strategy as L}from"@jackwener/opencli/registry";import{assertLiteralContent as M}from"../_shared/content-guard.js";const y='[data-lexical-editor="true"][contenteditable="true"]',B='[data-pp-fb-composer="1"]',_='[data-pp-fb-trigger="1"]',U='[data-pp-fb-post="1"]',k="https://www.facebook.com/",I=new Set([".jpg",".jpeg",".png",".gif",".webp"]);function T(z){const J=String(z??"").trim();if(!J)return k;if(/^https?:\/\//i.test(J)){let K;try{K=new URL(J)}catch{throw new V(`Invalid target URL: ${J}`)}if(K.hostname!=="facebook.com"&&!K.hostname.endsWith(".facebook.com"))throw new V("target URL must be on facebook.com.");return K.href}const Q=J.replace(/^@/,"").replace(/^\/+|\/+$/g,"");if(!/^[A-Za-z0-9.\-]+$/.test(Q))throw new V(`Invalid target "${z}" — pass a facebook.com URL or a bare profile/Page vanity.`);return`https://www.facebook.com/${Q}`}function w(z){return String(z).split(",").map((Q)=>Q.trim()).filter(Boolean).map((Q)=>{const K=H.resolve(Q),Y=H.extname(K).toLowerCase();if(!I.has(Y))throw new $(`Unsupported image format "${Y}". Supported: jpg, png, gif, webp`);const Z=v.statSync(K,{throwIfNoEntry:!1});if(!Z||!Z.isFile())throw new $(`Not a valid file: ${K}`);return K})}function R(){return`(() => {
|
|
2
|
+
const path = location.pathname || '';
|
|
3
|
+
if (/^\\/(login|checkpoint)(\\/|$|\\.php)/.test(path)) return 'login';
|
|
4
|
+
// Prefer an already-open editor (dialog first, so we don't grab a
|
|
5
|
+
// background feed publisher when the modal is up).
|
|
6
|
+
const dialog = document.querySelector('[role="dialog"]');
|
|
7
|
+
const scope = dialog || document;
|
|
8
|
+
const ed = scope.querySelector('${y}') || document.querySelector('${y}');
|
|
9
|
+
if (ed) {
|
|
10
|
+
ed.setAttribute('data-pp-fb-composer', '1');
|
|
11
|
+
ed.scrollIntoView({ block: 'center' });
|
|
12
|
+
return 'ready';
|
|
13
|
+
}
|
|
14
|
+
// No editor yet — look for the composer ENTRY. UNVERIFIED anchor: the feed
|
|
15
|
+
// publisher entry is a role=button in the primary column that opens the
|
|
16
|
+
// create-post dialog. We locate it structurally (a role=button that houses
|
|
17
|
+
// its own contenteditable-less text entry and is not an action bar button),
|
|
18
|
+
// never by its localized "What's on your mind" text.
|
|
19
|
+
const main = document.querySelector('[role="main"]') || document;
|
|
20
|
+
const candidates = [...main.querySelectorAll('[role="button"]')].filter((b) => {
|
|
21
|
+
if (b.closest('[role="toolbar"]')) return false;
|
|
22
|
+
// Entry box is a wide, tab-focusable button near the top of the feed with
|
|
23
|
+
// no icon-only content; heuristic, must be confirmed by live recon.
|
|
24
|
+
const r = b.getBoundingClientRect();
|
|
25
|
+
return r.width > 240 && r.height >= 40 && r.top < 700;
|
|
26
|
+
});
|
|
27
|
+
const trigger = candidates[0];
|
|
28
|
+
if (trigger) {
|
|
29
|
+
trigger.setAttribute('data-pp-fb-trigger', '1');
|
|
30
|
+
trigger.scrollIntoView({ block: 'center' });
|
|
31
|
+
return 'trigger';
|
|
32
|
+
}
|
|
33
|
+
return 'wait';
|
|
34
|
+
})()`}function S(){return`(() => {
|
|
35
|
+
const dialog = document.querySelector('[role="dialog"]') || document;
|
|
36
|
+
const ed = dialog.querySelector('${B}');
|
|
37
|
+
const btns = [...dialog.querySelectorAll('[role="button"][tabindex]')].filter((b) => {
|
|
38
|
+
if (ed && (b === ed || b.contains(ed) || ed.contains(b))) return false;
|
|
39
|
+
if (b.closest('[role="toolbar"]')) return false;
|
|
40
|
+
return true;
|
|
41
|
+
});
|
|
42
|
+
// The primary submit is the trailing footer button.
|
|
43
|
+
const submit = btns[btns.length - 1];
|
|
44
|
+
if (!submit) return { notfound: true };
|
|
45
|
+
if (submit.getAttribute('aria-disabled') === 'true' || submit.disabled) return { disabled: true };
|
|
46
|
+
submit.setAttribute('data-pp-fb-post', '1');
|
|
47
|
+
submit.scrollIntoView({ block: 'center' });
|
|
48
|
+
return { ok: true };
|
|
49
|
+
})()`}function O(z){return`(() => {
|
|
50
|
+
const collapse = (s) => String(s || '').replace(/\\s+/g, ' ').trim();
|
|
51
|
+
const ed = document.querySelector('${B}');
|
|
52
|
+
if (!ed) return { ok: true };
|
|
53
|
+
const remaining = collapse(ed.textContent || '');
|
|
54
|
+
if (remaining.length === 0) return { ok: true };
|
|
55
|
+
if (remaining === collapse(${JSON.stringify(z)})) return { ok: false, remaining };
|
|
56
|
+
return { ok: true };
|
|
57
|
+
})()`}const D='[role="dialog"] input[type="file"], input[type="file"][accept*="image"]';async function C(z,J){const Q=J.map((Y)=>{const Z=H.extname(Y).toLowerCase(),q=Z===".png"?"image/png":Z===".gif"?"image/gif":Z===".webp"?"image/webp":"image/jpeg";return{name:H.basename(Y),mime:q,base64:v.readFileSync(Y).toString("base64")}}),K=await z.evaluate(`(() => {
|
|
58
|
+
const input = document.querySelector(${JSON.stringify(D)});
|
|
59
|
+
if (!input) return { ok: false, error: 'No file input found in composer' };
|
|
60
|
+
const dt = new DataTransfer();
|
|
61
|
+
for (const file of ${JSON.stringify(Q)}) {
|
|
62
|
+
const bin = atob(file.base64);
|
|
63
|
+
const bytes = new Uint8Array(bin.length);
|
|
64
|
+
for (let i = 0; i < bin.length; i++) bytes[i] = bin.charCodeAt(i);
|
|
65
|
+
dt.items.add(new File([bytes], file.name, { type: file.mime }));
|
|
66
|
+
}
|
|
67
|
+
let assigned = false;
|
|
68
|
+
try {
|
|
69
|
+
Object.defineProperty(input, 'files', { value: dt.files, writable: false, configurable: true });
|
|
70
|
+
assigned = input.files && input.files.length >= ${JSON.stringify(J.length)};
|
|
71
|
+
} catch (e) {
|
|
72
|
+
try {
|
|
73
|
+
const setter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'files');
|
|
74
|
+
if (setter && setter.set) {
|
|
75
|
+
setter.set.call(input, dt.files);
|
|
76
|
+
assigned = input.files && input.files.length >= ${JSON.stringify(J.length)};
|
|
77
|
+
}
|
|
78
|
+
} catch (e2) { /* ignore */ }
|
|
79
|
+
}
|
|
80
|
+
if (!assigned) return { ok: false, error: 'Could not assign files to input' };
|
|
81
|
+
input.dispatchEvent(new Event('change', { bubbles: true }));
|
|
82
|
+
input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
83
|
+
return { ok: true };
|
|
84
|
+
})()`);if(!K?.ok)throw new $(`Image upload failed: ${K?.error??"unknown error"}`)}async function x(z,J){if(z.setFileInput)try{await z.setFileInput(J,D);return}catch{}await C(z,J)}N({site:"facebook",name:"post",access:"write",description:"Publish a new post to your Facebook feed (or a Page you manage). Pass the post text (multi-line allowed); optionally attach local images and target a Page. Published from your logged-in account — write genuine, on-topic content, not filler.",domain:"facebook.com",strategy:L.UI,browser:!0,args:[{name:"text",type:"string",required:!0,positional:!0,help:"Post text (multi-line allowed)"},{name:"images",type:"string",required:!1,help:"Local image paths, comma-separated (jpg/png/gif/webp)"},{name:"target",type:"string",required:!1,help:"Optional Page/profile to post to: a facebook.com URL or a bare vanity. Omit to post to your own feed."}],columns:["status","target","message"],func:async(z,J)=>{if(!z)throw new $("Browser session required for facebook post");const Q=M(J.text,{label:"帖子正文"});if(!Q)throw new V("Post text cannot be empty.");const K=J.images?w(J.images):[],Y=T(J.target);await z.goto(Y,{waitUntil:"none"});let Z=!1;for(let W=0;W<20;W++){const F=await z.evaluate(R());if(F==="login")throw new A("www.facebook.com","Facebook redirected to login/checkpoint — not signed in");if(F==="ready"){Z=!0;break}if(F==="trigger")await z.click(_);await z.wait(1)}if(!Z)throw new $("Post composer not found — the feed publisher may not have loaded, or you may lack permission to post here.");await z.click(B);await z.wait(1);await z.pressKey("Control+A");await z.pressKey("Delete");if(K.length>0){await x(z,K);await z.wait(2)}const q=Q.split(`
|
|
85
|
+
`);for(let W=0;W<q.length;W++){if(W>0)await z.pressKey("Shift+Enter");if(q[W].length)await z.typeText(B,q[W])}if(await z.evaluate(`(() => !!document.querySelector('[role="listbox"][aria-label], ul[role="listbox"]'))()`))await z.pressKey("Escape");const G=(W)=>String(W||"").replace(/\s+/g," ").trim(),X=await z.evaluate(`(() => {
|
|
86
|
+
const ed = document.querySelector('${B}');
|
|
87
|
+
return ed ? (ed.textContent || '') : null;
|
|
88
|
+
})()`);if(X===null||!G(X).includes(G(Q)))throw new $(`Composed text did not land before publish (got ${JSON.stringify((X||"").slice(0,60))}).`);const j=await z.evaluate(S());if(j?.notfound)throw new $("Post button not found in the composer.");if(j?.disabled)throw new $("Post button is disabled — composer may be empty or the post was rejected.");await z.click(U);await z.wait(2);if(!(await z.evaluate(O(Q)))?.ok)throw new $("Post still in the composer after clicking Post — publish blocked (rate limit, restricted, or no permission). Not confirmed sent; verify before retrying.");const f=K.length>0?` with ${K.length} image(s)`:"";return[{status:"success",target:Y,message:`Post published${f}.`}]}});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import{cli as e}from"@jackwener/opencli/registry";e({site:"facebook",name:"profile",access:"read",description:"Get Facebook user/page profile info",domain:"www.facebook.com",args:[{name:"username",required:!0,positional:!0,help:"Facebook username or page name"}],columns:["name","username","friends","followers","url"],pipeline:[{navigate:{url:"https://www.facebook.com/${{ args.username }}",settleMs:3000}},{evaluate:`(() => {
|
|
2
|
+
const h1 = document.querySelector('h1');
|
|
3
|
+
let name = h1 ? h1.textContent.trim() : '';
|
|
4
|
+
|
|
5
|
+
// Find friends/followers links
|
|
6
|
+
const links = Array.from(document.querySelectorAll('a'));
|
|
7
|
+
const friendsLink = links.find(a => a.href && a.href.includes('/friends'));
|
|
8
|
+
const followersLink = links.find(a => a.href && a.href.includes('/followers'));
|
|
9
|
+
|
|
10
|
+
return [{
|
|
11
|
+
name: name,
|
|
12
|
+
username: \${{ args.username | json }},
|
|
13
|
+
friends: friendsLink ? friendsLink.textContent.trim() : '-',
|
|
14
|
+
followers: followersLink ? followersLink.textContent.trim() : '-',
|
|
15
|
+
url: window.location.href,
|
|
16
|
+
}];
|
|
17
|
+
})()
|
|
18
|
+
`}]});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{cli as e}from"@jackwener/opencli/registry";e({site:"facebook",name:"search",access:"read",description:"Search Facebook for people, pages, or posts",domain:"www.facebook.com",args:[{name:"query",required:!0,positional:!0,help:"Search query"},{name:"limit",type:"int",default:10,help:"Number of results"}],columns:["index","title","text","url"],pipeline:[{navigate:"https://www.facebook.com"},{navigate:{url:"https://www.facebook.com/search/top?q=${{ args.query | urlencode }}",settleMs:4000}},{evaluate:`(async () => {
|
|
2
|
+
const limit = \${{ args.limit }};
|
|
3
|
+
// Search results are typically in role="article" or role="listitem"
|
|
4
|
+
let items = document.querySelectorAll('[role="article"]');
|
|
5
|
+
if (items.length === 0) {
|
|
6
|
+
items = document.querySelectorAll('[role="listitem"]');
|
|
7
|
+
}
|
|
8
|
+
return Array.from(items)
|
|
9
|
+
.filter(el => el.textContent.trim().length > 20)
|
|
10
|
+
.slice(0, limit)
|
|
11
|
+
.map((el, i) => {
|
|
12
|
+
const link = el.querySelector('a[href*="facebook.com/"]');
|
|
13
|
+
const heading = el.querySelector('h2, h3, h4, strong');
|
|
14
|
+
return {
|
|
15
|
+
index: i + 1,
|
|
16
|
+
title: heading ? heading.textContent.trim().substring(0, 80) : '',
|
|
17
|
+
text: el.textContent.trim().replace(/\\s+/g, ' ').substring(0, 150),
|
|
18
|
+
url: link ? link.href.split('?')[0] : '',
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
})()
|
|
22
|
+
`}]});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as p,Strategy as n}from"@jackwener/opencli/registry";import{EmptyResultError as i}from"@jackwener/opencli/errors";import{FLATHUB_API_BASE as u,FLATHUB_APP_BASE as m,flathubFetch as c,joinList as o,pickLatestRelease as d,requireAppId as g}from"./utils.js";p({site:"flathub",name:"app",access:"read",description:"Full Flathub appstream metadata for an app id (license, categories, latest release)",domain:"flathub.org",strategy:n.PUBLIC,browser:!1,args:[{name:"appId",positional:!0,required:!0,help:'AppStream id (e.g. "org.mozilla.firefox", "org.gnome.Calculator")'}],columns:["appId","name","summary","developer","license","isFreeLicense","isEol","categories","keywords","latestVersion","latestReleaseDate","homepage","bugtracker","donation","url"],func:async(s)=>{const t=g(s.appId),l=`${u}/appstream/${encodeURIComponent(t)}`,e=await c(l,"flathub app");if(!e||typeof e!=="object"||!e.id)throw new i("flathub app",`Flathub app "${t}" returned empty payload.`);const a=e.urls&&typeof e.urls==="object"?e.urls:{},r=d(e.releases);return[{appId:typeof e.id==="string"?e.id:t,name:typeof e.name==="string"?e.name:null,summary:typeof e.summary==="string"?e.summary:null,developer:typeof e.developer_name==="string"?e.developer_name:null,license:typeof e.project_license==="string"?e.project_license:null,isFreeLicense:e.is_free_license===!0,isEol:e.is_eol===!0,categories:o(e.categories),keywords:o(e.keywords,8),latestVersion:r.version,latestReleaseDate:r.date,homepage:typeof a.homepage==="string"?a.homepage:null,bugtracker:typeof a.bugtracker==="string"?a.bugtracker:null,donation:typeof a.donation==="string"?a.donation:null,url:`${m}/${t}`}]}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as Q,Strategy as V}from"@jackwener/opencli/registry";import{EmptyResultError as W}from"@jackwener/opencli/errors";import{FLATHUB_API_BASE as X,FLATHUB_APP_BASE as Y,flathubFetch as Z,joinList as $,requireBoundedInt as N,requireString as O}from"./utils.js";Q({site:"flathub",name:"search",access:"read",description:"Search Flathub apps by keyword",domain:"flathub.org",strategy:V.PUBLIC,browser:!1,args:[{name:"query",positional:!0,required:!0,help:"Search keyword"},{name:"limit",type:"int",default:25,help:"Max apps (1-100)"}],columns:["rank","appId","name","summary","developer","license","isFreeLicense","mainCategories","installsLastMonth","updatedAt","url"],func:async(z)=>{const C=O(z.query,"query"),D=N(z.limit,25,100),K=`${X}/search`,G=await Z(K,"flathub search",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:C,hitsPerPage:D,page:1})}),J=Array.isArray(G?.hits)?G.hits:[];if(!J.length)throw new W("flathub search",`No Flathub apps matched "${C}".`);return J.slice(0,D).map((v,M)=>{const x=typeof v?.app_id==="string"?v.app_id:null;return{rank:M+1,appId:x,name:typeof v?.name==="string"?v.name:null,summary:typeof v?.summary==="string"?v.summary:null,developer:typeof v?.developer_name==="string"?v.developer_name:null,license:typeof v?.project_license==="string"?v.project_license:null,isFreeLicense:v?.is_free_license===!0,mainCategories:typeof v?.main_categories==="string"?v.main_categories:$(v?.main_categories),installsLastMonth:typeof v?.installs_last_month==="number"?v.installs_last_month:null,updatedAt:typeof v?.updated_at==="number"&&v.updated_at>0?new Date(v.updated_at*1000).toISOString().slice(0,10):typeof v?.updated_at==="string"?v.updated_at:null,url:x?`${Y}/${x}`:""}})}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ArgumentError as J,CommandExecutionError as K,EmptyResultError as Q}from"@jackwener/opencli/errors";export const FLATHUB_API_BASE="https://flathub.org/api/v2",FLATHUB_APP_BASE="https://flathub.org/apps";const W="opencli-flathub-adapter/1.0 (+https://github.com/jackwener/opencli; mailto:opencli@example.com)",X=/^[A-Za-z][A-Za-z0-9_-]*(?:\.[A-Za-z0-9_][A-Za-z0-9_-]*){1,}$/;export function requireString(h,z){const q=String(h??"").trim();if(!q)throw new J(`flathub ${z} cannot be empty`);return q}export function requireBoundedInt(h,z,q,G="limit"){const H=h??z,B=typeof H==="number"?H:Number(H);if(!Number.isInteger(B)||B<=0)throw new J(`flathub ${G} must be a positive integer`);if(B>q)throw new J(`flathub ${G} must be <= ${q}`);return B}export function requireAppId(h){const z=String(h??"").trim();if(!z)throw new J('flathub appId is required (e.g. "org.mozilla.firefox")');if(!X.test(z))throw new J(`flathub appId "${h}" is not a valid AppStream identifier`,'AppStream IDs use reverse-DNS like "org.mozilla.firefox" — letters/digits/`._-` with at least one dot.');return z}export async function flathubFetch(h,z,q){let G;try{G=await fetch(h,{method:q?.method??"GET",headers:{"user-agent":W,accept:"application/json",...q?.headers??{}},body:q?.body})}catch(B){throw new K(`${z} request failed: ${B?.message??B}`,"Check that flathub.org is reachable from this network.")}if(G.status===404)throw new Q(z,`Flathub returned 404 for ${h}.`);if(G.status===429)throw new K(`${z} returned HTTP 429 (rate limited)`);if(!G.ok)throw new K(`${z} returned HTTP ${G.status}`);let H;try{H=await G.json()}catch(B){throw new K(`${z} returned malformed JSON: ${B?.message??B}`)}return H}export function joinList(h,z=10){if(!Array.isArray(h))return"";const q=h.filter((G)=>typeof G==="string"&&G.trim());if(q.length===0)return"";if(q.length>z)return[...q.slice(0,z),`(+${q.length-z})`].join(", ");return q.join(", ")}function L(h){if(typeof h==="number"&&Number.isFinite(h))return h;if(typeof h==="string"&&/^\d+$/.test(h.trim()))return Number(h.trim());return 0}export function pickLatestRelease(h){if(!Array.isArray(h)||h.length===0)return{version:null,date:null};const q=[...h].filter((B)=>B&&typeof B==="object").sort((B,M)=>{return L(M?.timestamp)-L(B?.timestamp)})[0];if(!q)return{version:null,date:null};let G=null;const H=L(q.timestamp);if(H>0){const B=new Date(H*1000);if(!Number.isNaN(B.getTime()))G=B.toISOString().slice(0,10)}if(!G&&typeof q.date==="string"&&q.date.trim())G=q.date.trim();return{version:typeof q.version==="string"?q.version:null,date:G}}
|