publishport-opencli 1.0.20 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/clis/12306/me.js +2 -2
- package/clis/12306/orders.js +3 -3
- package/clis/12306/passengers.js +3 -3
- package/clis/12306/price.js +1 -1
- package/clis/12306/stations.js +1 -1
- package/clis/12306/train.js +1 -1
- package/clis/12306/trains.js +1 -1
- package/clis/12306/utils.js +1 -1
- package/clis/1688/download.js +1 -1
- package/clis/1688/item.js +4 -4
- package/clis/1688/search.js +4 -4
- package/clis/1688/store.js +4 -4
- package/clis/1point3acres/forum.js +1 -1
- package/clis/1point3acres/forums.js +1 -1
- package/clis/1point3acres/notifications.js +1 -1
- package/clis/1point3acres/search.js +1 -1
- package/clis/1point3acres/thread.js +2 -2
- package/clis/1point3acres/user.js +1 -1
- package/clis/1point3acres/utils.js +2 -2
- package/clis/36kr/article.js +2 -2
- package/clis/36kr/hot.js +2 -2
- package/clis/36kr/news.js +1 -1
- package/clis/36kr/search.js +2 -2
- package/clis/51job/company.js +2 -2
- package/clis/51job/detail.js +2 -2
- package/clis/51job/hot.js +1 -1
- package/clis/51job/search.js +1 -1
- package/clis/51job/utils.js +7 -7
- package/clis/_atlassian/shared.js +9 -9
- package/clis/_shared/article/auth.js +4 -4
- package/clis/_shared/article/douban-md2draft.js +4 -4
- package/clis/_shared/article/format.js +1 -1
- package/clis/_shared/article/images.js +7 -7
- package/clis/_shared/article/login.js +1 -1
- package/clis/_shared/article/publish.js +11 -11
- package/clis/_shared/common.js +1 -1
- package/clis/_shared/content-guard.js +1 -1
- package/clis/_shared/desktop-commands.js +1 -1
- package/clis/_shared/file-inject.js +12 -12
- package/clis/_shared/self-hosted-sites.js +2 -2
- package/clis/_shared/site-auth.js +1 -1
- package/clis/_shared/token-auth.js +2 -2
- package/clis/_shared/video-publish.js +9 -9
- package/clis/amazon/offer.js +3 -3
- package/clis/amazon/product.js +5 -5
- package/clis/amazon/shared.js +6 -6
- package/clis/antigravity/_actions.js +13 -13
- package/clis/antigravity/audit-extras.js +10 -10
- package/clis/antigravity/delete.js +1 -1
- package/clis/antigravity/model.js +6 -6
- package/clis/antigravity/new.js +2 -2
- package/clis/antigravity/read.js +2 -2
- package/clis/antigravity/rename.js +1 -1
- package/clis/antigravity/send.js +3 -3
- package/clis/antigravity/serve.js +17 -17
- package/clis/antigravity/storage.js +6 -6
- package/clis/antigravity/watch.js +2 -2
- package/clis/apple-podcasts/episodes.js +1 -1
- package/clis/apple-podcasts/top.js +1 -1
- package/clis/apple-podcasts/utils.js +1 -1
- package/clis/archive/item.js +1 -1
- package/clis/archive/search.js +1 -1
- package/clis/archive/snapshots.js +1 -1
- package/clis/archive/wayback.js +1 -1
- package/clis/arxiv/author.js +1 -1
- package/clis/arxiv/utils.js +1 -1
- package/clis/autohome/brand.js +1 -1
- package/clis/autohome/score.js +1 -1
- package/clis/autohome/utils.js +1 -1
- package/clis/baijiahao/article.js +1 -1
- package/clis/baijiahao/lists.js +1 -1
- package/clis/baijiahao/login.js +1 -1
- package/clis/baijiahao/publish.js +9 -9
- package/clis/baijiahao/stats.js +1 -1
- package/clis/baijiahao/whoami.js +1 -1
- package/clis/band/bands.js +2 -2
- package/clis/band/mentions.js +2 -2
- package/clis/band/post.js +4 -4
- package/clis/band/posts.js +3 -3
- package/clis/barchart/flow.js +3 -3
- package/clis/barchart/greeks.js +2 -2
- package/clis/barchart/quote.js +3 -3
- package/clis/bbc/news.js +1 -1
- package/clis/bbc/topic.js +1 -1
- package/clis/bbc/utils.js +1 -1
- package/clis/bilibili/article.js +1 -1
- package/clis/bilibili/categories.js +1 -1
- package/clis/bilibili/coin.js +1 -1
- package/clis/bilibili/comment-del.js +1 -1
- package/clis/bilibili/comment-like.js +1 -1
- package/clis/bilibili/comment.js +1 -1
- package/clis/bilibili/comments.js +1 -1
- package/clis/bilibili/dm-list.js +1 -1
- package/clis/bilibili/dm-read.js +1 -1
- package/clis/bilibili/dm-send.js +1 -1
- package/clis/bilibili/download.js +2 -2
- package/clis/bilibili/drafts.js +1 -1
- package/clis/bilibili/dynamic-post.js +3 -3
- package/clis/bilibili/favorite-add.js +1 -1
- package/clis/bilibili/favorite.js +1 -1
- package/clis/bilibili/feed.js +2 -2
- package/clis/bilibili/follow.js +1 -1
- package/clis/bilibili/following.js +1 -1
- package/clis/bilibili/like.js +1 -1
- package/clis/bilibili/partitions.js +1 -1
- package/clis/bilibili/stats.js +1 -1
- package/clis/bilibili/subtitle.js +3 -3
- package/clis/bilibili/summary.js +1 -1
- package/clis/bilibili/topics.js +1 -1
- package/clis/bilibili/unfollow.js +1 -1
- package/clis/bilibili/upload.js +1 -1
- package/clis/bilibili/utils.js +10 -10
- package/clis/bilibili/video-drafts.js +1 -1
- package/clis/bilibili/video.js +1 -1
- package/clis/bloomberg/businessweek.js +4 -4
- package/clis/bloomberg/news.js +2 -2
- package/clis/bloomberg/utils.js +13 -13
- package/clis/bluesky/post.js +1 -1
- package/clis/bluesky/shared.js +11 -11
- package/clis/bluesky/whoami.js +1 -1
- package/clis/booking/search.js +2 -2
- package/clis/boss/accept.js +1 -1
- package/clis/boss/applied.js +1 -1
- package/clis/boss/auth.js +1 -1
- package/clis/boss/batchgreet.js +1 -1
- package/clis/boss/bossinfo.js +1 -1
- package/clis/boss/chatlist.js +1 -1
- package/clis/boss/chatmsg.js +1 -1
- package/clis/boss/cities.js +1 -1
- package/clis/boss/detail.js +1 -1
- package/clis/boss/exchange.js +1 -1
- package/clis/boss/greet.js +1 -1
- package/clis/boss/interviews.js +1 -1
- package/clis/boss/invite.js +1 -1
- package/clis/boss/joblist.js +1 -1
- package/clis/boss/mark.js +1 -1
- package/clis/boss/me.js +2 -2
- package/clis/boss/recommend.js +1 -1
- package/clis/boss/resumedelete.js +1 -1
- package/clis/boss/resumelist.js +1 -1
- package/clis/boss/resumeupload.js +11 -11
- package/clis/boss/search.js +1 -1
- package/clis/boss/send.js +1 -1
- package/clis/boss/sendresume.js +1 -1
- package/clis/boss/stats.js +1 -1
- package/clis/boss/unread.js +1 -1
- package/clis/boss/utils.js +13 -13
- package/clis/chaoxing/assignments.js +1 -1
- package/clis/chaoxing/exams.js +1 -1
- package/clis/chaoxing/utils.js +9 -9
- package/clis/chatgpt/ask.js +1 -1
- package/clis/chatgpt/auth.js +2 -2
- package/clis/chatgpt/detail.js +1 -1
- package/clis/chatgpt/image.js +1 -1
- package/clis/chatgpt/read.js +1 -1
- package/clis/chatgpt/send.js +1 -1
- package/clis/chatgpt/utils.js +59 -59
- package/clis/chatgpt-app/ask.js +1 -1
- package/clis/chatgpt-app/send.js +1 -1
- package/clis/chatwise/model.js +6 -6
- package/clis/chess/analyze.js +1 -1
- package/clis/chess/game.js +1 -1
- package/clis/chess/games.js +1 -1
- package/clis/chess/stats.js +1 -1
- package/clis/chess/utils.js +1 -1
- package/clis/claude/ask.js +2 -2
- package/clis/claude/detail.js +1 -1
- package/clis/claude/new.js +1 -1
- package/clis/claude/read.js +1 -1
- package/clis/claude/send.js +1 -1
- package/clis/claude/utils.js +23 -23
- package/clis/cnblogs/article.js +1 -1
- package/clis/cnblogs/login.js +1 -1
- package/clis/cnblogs/stats.js +7 -7
- package/clis/cnblogs/whoami.js +1 -1
- package/clis/codex/_actions.js +3 -3
- package/clis/codex/archive.js +1 -1
- package/clis/codex/ask.js +6 -6
- package/clis/codex/model.js +8 -8
- package/clis/codex/pin.js +1 -1
- package/clis/codex/rename.js +4 -4
- package/clis/codex/send.js +3 -3
- package/clis/codex/sidebar.js +1 -1
- package/clis/coingecko/categories.js +1 -1
- package/clis/coingecko/coin.js +1 -1
- package/clis/coingecko/derivatives.js +1 -1
- package/clis/coingecko/exchanges.js +1 -1
- package/clis/coingecko/global.js +1 -1
- package/clis/coingecko/trending.js +1 -1
- package/clis/confluence/search.js +1 -1
- package/clis/coupang/product.js +3 -3
- package/clis/coupang/utils.js +1 -1
- package/clis/crates/crate.js +1 -1
- package/clis/crates/search.js +1 -1
- package/clis/crates/utils.js +1 -1
- package/clis/csdn/article.js +13 -13
- package/clis/csdn/columns.js +1 -1
- package/clis/csdn/login.js +1 -1
- package/clis/csdn/stats.js +4 -4
- package/clis/csdn/whoami.js +1 -1
- package/clis/cto51/article.js +1 -1
- package/clis/cto51/whoami.js +1 -1
- package/clis/ctrip/flight.js +2 -2
- package/clis/ctrip/hotel-search.js +3 -3
- package/clis/ctrip/hotel-suggest.js +1 -1
- package/clis/ctrip/search.js +1 -1
- package/clis/ctrip/utils.js +6 -6
- package/clis/cursor/ask.js +5 -5
- package/clis/cursor/composer.js +2 -2
- package/clis/cursor/model.js +4 -4
- package/clis/cursor/send.js +2 -2
- package/clis/dblp/author.js +1 -1
- package/clis/dblp/paper.js +1 -1
- package/clis/dblp/search.js +1 -1
- package/clis/dblp/utils.js +1 -1
- package/clis/dblp/venue.js +1 -1
- package/clis/deepseek/ask.js +1 -1
- package/clis/deepseek/auth.js +2 -2
- package/clis/deepseek/detail.js +1 -1
- package/clis/deepseek/new.js +1 -1
- package/clis/deepseek/read.js +1 -1
- package/clis/deepseek/send.js +7 -7
- package/clis/deepseek/utils.js +25 -25
- package/clis/defillama/protocol.js +1 -1
- package/clis/defillama/protocols.js +1 -1
- package/clis/defillama/utils.js +1 -1
- package/clis/devto/auth.js +2 -2
- package/clis/devto/latest.js +1 -1
- package/clis/devto/publish.js +5 -5
- package/clis/devto/read.js +2 -2
- package/clis/devto/stats.js +3 -3
- package/clis/dianping/auth.js +2 -2
- package/clis/dianping/cityResolver.js +2 -2
- package/clis/dianping/search.js +1 -1
- package/clis/dianping/shop.js +1 -1
- package/clis/dianping/utils.js +1 -1
- package/clis/discord-app/delete.js +3 -3
- package/clis/discord-app/read.js +1 -1
- package/clis/discord-app/thread-read.js +1 -1
- package/clis/discord-web/auth.js +2 -2
- package/clis/discord-web/send.js +5 -5
- package/clis/dockerhub/image.js +1 -1
- package/clis/dockerhub/search.js +1 -1
- package/clis/dockerhub/utils.js +1 -1
- package/clis/dongchedi/koubei.js +1 -1
- package/clis/dongchedi/models.js +1 -1
- package/clis/dongchedi/score.js +1 -1
- package/clis/dongchedi/search.js +1 -1
- package/clis/dongchedi/series.js +1 -1
- package/clis/dongchedi/specs.js +1 -1
- package/clis/dongchedi/utils.js +1 -1
- package/clis/douban/article.js +3 -3
- package/clis/douban/auth.js +2 -2
- package/clis/douban/download.js +1 -1
- package/clis/douban/utils.js +23 -23
- package/clis/doubao/auth.js +3 -3
- package/clis/doubao/utils.js +39 -39
- package/clis/doubao-app/ask.js +1 -1
- package/clis/doubao-app/utils.js +4 -4
- package/clis/douyin/_shared/browser-fetch.js +7 -7
- package/clis/douyin/_shared/draft-cache.js +1 -1
- package/clis/douyin/_shared/imagex-upload.js +1 -1
- package/clis/douyin/_shared/sts2.js +1 -1
- package/clis/douyin/_shared/text-extra.js +1 -1
- package/clis/douyin/_shared/tos-upload.js +4 -4
- package/clis/douyin/_shared/transcode.js +1 -1
- package/clis/douyin/_shared/vod-upload.js +4 -4
- package/clis/douyin/draft.js +18 -18
- package/clis/douyin/drafts.js +1 -1
- package/clis/douyin/publish-image.js +12 -12
- package/clis/douyin/publish.js +9 -9
- package/clis/douyin/search.js +3 -3
- package/clis/douyin/videos.js +1 -1
- package/clis/eastmoney/_secid.js +1 -1
- package/clis/eastmoney/announcement.js +1 -1
- package/clis/eastmoney/article.js +1 -1
- package/clis/eastmoney/convertible.js +1 -1
- package/clis/eastmoney/etf.js +1 -1
- package/clis/eastmoney/holders.js +1 -1
- package/clis/eastmoney/index-board.js +1 -1
- package/clis/eastmoney/kline.js +1 -1
- package/clis/eastmoney/kuaixun.js +1 -1
- package/clis/eastmoney/longhu.js +1 -1
- package/clis/eastmoney/money-flow.js +1 -1
- package/clis/eastmoney/northbound.js +1 -1
- package/clis/eastmoney/quote.js +1 -1
- package/clis/eastmoney/rank.js +1 -1
- package/clis/eastmoney/sectors.js +1 -1
- package/clis/endoflife/product.js +1 -1
- package/clis/endoflife/utils.js +1 -1
- package/clis/facebook/comment.js +8 -8
- package/clis/facebook/feed.js +4 -4
- package/clis/facebook/like.js +5 -5
- package/clis/facebook/notifications.js +3 -3
- package/clis/facebook/post.js +11 -11
- package/clis/facebook/search.js +3 -3
- package/clis/flathub/app.js +1 -1
- package/clis/flathub/search.js +1 -1
- package/clis/flathub/utils.js +1 -1
- package/clis/flomo/memos.js +1 -1
- package/clis/gemini/deep-research-result.js +4 -4
- package/clis/gemini/deep-research.js +1 -1
- package/clis/gemini/detail.js +1 -1
- package/clis/gemini/history.js +1 -1
- package/clis/gemini/image.js +2 -2
- package/clis/gemini/status.js +1 -1
- package/clis/gemini/utils.js +43 -43
- package/clis/geogebra/hexagon.js +1 -1
- package/clis/geogebra/info.js +3 -3
- package/clis/geogebra/triangle.js +1 -1
- package/clis/geogebra/utils.js +11 -11
- package/clis/ghost/login.js +1 -1
- package/clis/ghost/shared.js +2 -2
- package/clis/gitee/auth.js +2 -2
- package/clis/github-trending/repos.js +1 -1
- package/clis/google/news.js +1 -1
- package/clis/google/search.js +2 -2
- package/clis/google/suggest.js +1 -1
- package/clis/google/trends.js +1 -1
- package/clis/google/utils.js +1 -1
- package/clis/goproxy/module.js +1 -1
- package/clis/goproxy/utils.js +1 -1
- package/clis/goproxy/versions.js +1 -1
- package/clis/gov-policy/recent.js +2 -2
- package/clis/gov-policy/search.js +2 -2
- package/clis/grok/ask.js +1 -1
- package/clis/grok/detail.js +1 -1
- package/clis/grok/image.js +8 -8
- package/clis/grok/pin.js +1 -1
- package/clis/grok/send.js +1 -1
- package/clis/grok/status.js +1 -1
- package/clis/grok/utils.js +21 -21
- package/clis/guazi/browse.js +1 -1
- package/clis/guazi/car.js +1 -1
- package/clis/guazi/utils.js +1 -1
- package/clis/hackernews/auth.js +2 -2
- package/clis/hackernews/comment.js +8 -8
- package/clis/hackernews/read.js +7 -7
- package/clis/hackernews/submit.js +7 -7
- package/clis/hashnode/auth.js +3 -3
- package/clis/hashnode/publish.js +14 -14
- package/clis/hf/auth.js +2 -2
- package/clis/hf/models.js +1 -1
- package/clis/hf/paper.js +1 -1
- package/clis/hf/spaces.js +1 -1
- package/clis/hf/top.js +1 -1
- package/clis/homebrew/cask.js +1 -1
- package/clis/homebrew/formula.js +1 -1
- package/clis/homebrew/popular.js +1 -1
- package/clis/homebrew/utils.js +1 -1
- package/clis/huodongxing/events.js +1 -1
- package/clis/hupu/detail.js +4 -4
- package/clis/hupu/hot.js +3 -3
- package/clis/hupu/reply.js +1 -1
- package/clis/hupu/search.js +1 -1
- package/clis/hupu/unlike.js +1 -1
- package/clis/hupu/utils.js +10 -10
- package/clis/imdb/person.js +2 -2
- package/clis/imdb/reviews.js +3 -3
- package/clis/imdb/search.js +2 -2
- package/clis/imdb/title.js +1 -1
- package/clis/imdb/top.js +1 -1
- package/clis/imdb/trending.js +1 -1
- package/clis/imdb/utils.js +13 -13
- package/clis/imooc/article.js +6 -6
- package/clis/imooc/login.js +1 -1
- package/clis/imooc/whoami.js +1 -1
- package/clis/indeed/job.js +2 -2
- package/clis/indeed/search.js +2 -2
- package/clis/indeed/utils.js +1 -1
- package/clis/infoq/article.js +2 -2
- package/clis/infoq/login.js +1 -1
- package/clis/infoq/whoami.js +1 -1
- package/clis/instagram/_shared/private-publish.js +4 -4
- package/clis/instagram/_shared/protocol-capture.js +9 -9
- package/clis/instagram/detail.js +3 -3
- package/clis/instagram/post.js +25 -25
- package/clis/instagram/reel.js +18 -18
- package/clis/instagram/story.js +4 -4
- package/clis/instagram/user.js +2 -2
- package/clis/jd/item.js +65 -65
- package/clis/jianshu/article.js +1 -1
- package/clis/jianshu/login.js +1 -1
- package/clis/jianshu/notebooks.js +1 -1
- package/clis/jianshu/whoami.js +1 -1
- package/clis/jianyu/search.js +6 -6
- package/clis/jianyu/shared/procurement-contract.js +1 -1
- package/clis/jike/api.js +6 -6
- package/clis/jike/auth.js +3 -3
- package/clis/jike/comment.js +1 -1
- package/clis/jike/create.js +6 -6
- package/clis/jike/feed.js +3 -3
- package/clis/jike/like.js +1 -1
- package/clis/jike/notifications.js +3 -3
- package/clis/jike/repost.js +13 -13
- package/clis/jike/search.js +3 -3
- package/clis/jimeng/auth.js +2 -2
- package/clis/jimeng/generate.js +10 -10
- package/clis/jira/shared.js +1 -1
- package/clis/juejin/article.js +4 -4
- package/clis/juejin/categories.js +1 -1
- package/clis/juejin/hot.js +1 -1
- package/clis/juejin/login.js +1 -1
- package/clis/juejin/recommend.js +1 -1
- package/clis/juejin/stats.js +3 -3
- package/clis/juejin/tags.js +1 -1
- package/clis/juejin/utils.js +1 -1
- package/clis/juejin/whoami.js +1 -1
- package/clis/ke/utils.js +4 -4
- package/clis/kimi/_utils.js +7 -7
- package/clis/kimi/audit-extras.js +14 -14
- package/clis/kimi/auth.js +3 -3
- package/clis/kimi/chat.js +15 -15
- package/clis/kimi/storage.js +5 -5
- package/clis/kimi/ui.js +13 -13
- package/clis/kimi/usage.js +3 -3
- package/clis/kuaishou/auth.js +1 -1
- package/clis/kuaishou/publish.js +6 -6
- package/clis/lesswrong/_helpers.js +5 -5
- package/clis/lesswrong/comments.js +5 -5
- package/clis/lichess/top.js +1 -1
- package/clis/lichess/user.js +1 -1
- package/clis/lichess/utils.js +1 -1
- package/clis/linkedin/comment.js +1 -1
- package/clis/linkedin/connect.js +11 -11
- package/clis/linkedin/create.js +5 -5
- package/clis/linkedin/follow.js +1 -1
- package/clis/linkedin/inbox.js +1 -1
- package/clis/linkedin/job-detail.js +3 -3
- package/clis/linkedin/like.js +1 -1
- package/clis/linkedin/notifications.js +1 -1
- package/clis/linkedin/people-search.js +1 -1
- package/clis/linkedin/post-comments.js +1 -1
- package/clis/linkedin/post-detail.js +1 -1
- package/clis/linkedin/profile-analytics.js +1 -1
- package/clis/linkedin/profile-api.js +13 -13
- package/clis/linkedin/profile-experience.js +1 -1
- package/clis/linkedin/profile-projects.js +1 -1
- package/clis/linkedin/profile-read.js +3 -3
- package/clis/linkedin/reply.js +1 -1
- package/clis/linkedin/repost.js +1 -1
- package/clis/linkedin/safe-send.js +8 -8
- package/clis/linkedin/salesnav-inbox.js +5 -5
- package/clis/linkedin/salesnav-message.js +3 -3
- package/clis/linkedin/salesnav-search.js +4 -4
- package/clis/linkedin/salesnav-thread.js +1 -1
- package/clis/linkedin/search-api.js +3 -3
- package/clis/linkedin/search.js +8 -8
- package/clis/linkedin/social-api.js +31 -31
- package/clis/linkedin/timeline.js +3 -3
- package/clis/linkedin-learning/search.js +2 -2
- package/clis/linkedin-learning/trending.js +2 -2
- package/clis/linux-do/feed.js +4 -4
- package/clis/linux-do/topic-content.js +8 -8
- package/clis/lobsters/domain.js +1 -1
- package/clis/lobsters/read.js +7 -7
- package/clis/maimai/auth.js +2 -2
- package/clis/maimai/search-talents.js +4 -4
- package/clis/manus/_utils.js +1 -1
- package/clis/mastodon/login.js +1 -1
- package/clis/mastodon/post.js +1 -1
- package/clis/mastodon/shared.js +12 -12
- package/clis/mastodon/whoami.js +1 -1
- package/clis/maven/artifact.js +1 -1
- package/clis/maven/search.js +1 -1
- package/clis/maven/utils.js +1 -1
- package/clis/mdn/search.js +1 -1
- package/clis/medium/article.js +5 -5
- package/clis/medium/login.js +1 -1
- package/clis/medium/stats.js +3 -3
- package/clis/medium/tag.js +1 -1
- package/clis/medium/whoami.js +1 -1
- package/clis/mubu/notes.js +1 -1
- package/clis/mubu/utils.js +15 -15
- package/clis/note/auth.js +2 -2
- package/clis/note/note-utils.js +2 -2
- package/clis/note/publish.js +8 -8
- package/clis/notebooklm/add-source.js +8 -8
- package/clis/notebooklm/create.js +1 -1
- package/clis/notebooklm/generate-slides.js +1 -1
- package/clis/notebooklm/notes-get.js +1 -1
- package/clis/notebooklm/rpc.js +8 -8
- package/clis/notebooklm/source-fulltext.js +1 -1
- package/clis/notebooklm/utils.js +10 -10
- package/clis/nowcoder/auth.js +2 -2
- package/clis/nowcoder/comment.js +1 -1
- package/clis/nowcoder/comments.js +1 -1
- package/clis/nowcoder/dm-list.js +1 -1
- package/clis/nowcoder/dm-read.js +1 -1
- package/clis/nowcoder/dm-send.js +1 -1
- package/clis/nowcoder/drafts.js +1 -1
- package/clis/nowcoder/inbox.js +1 -1
- package/clis/nowcoder/like.js +1 -1
- package/clis/nowcoder/my.js +1 -1
- package/clis/nowcoder/post.js +1 -1
- package/clis/nowcoder/utils.js +13 -13
- package/clis/npm/downloads.js +1 -1
- package/clis/npm/package.js +1 -1
- package/clis/npm/search.js +1 -1
- package/clis/npm/utils.js +1 -1
- package/clis/nuget/package.js +1 -1
- package/clis/nuget/search.js +1 -1
- package/clis/nuget/utils.js +1 -1
- package/clis/nvd/cve.js +1 -1
- package/clis/oeis/search.js +1 -1
- package/clis/oeis/sequence.js +1 -1
- package/clis/oeis/utils.js +1 -1
- package/clis/ones/common.js +6 -6
- package/clis/ones/enrich-tasks.js +1 -1
- package/clis/ones/my-tasks.js +1 -1
- package/clis/ones/resolve-labels.js +1 -1
- package/clis/ones/task-helpers.js +1 -1
- package/clis/ones/task.js +1 -1
- package/clis/ones/worklog.js +7 -7
- package/clis/openalex/search.js +1 -1
- package/clis/openalex/utils.js +1 -1
- package/clis/openalex/work.js +1 -1
- package/clis/openfda/drug-label.js +1 -1
- package/clis/openfda/food-recall.js +1 -1
- package/clis/openfda/utils.js +1 -1
- package/clis/openreview/author.js +1 -1
- package/clis/openreview/paper.js +1 -1
- package/clis/openreview/reviews.js +3 -3
- package/clis/openreview/search.js +1 -1
- package/clis/openreview/utils.js +1 -1
- package/clis/openreview/venue.js +1 -1
- package/clis/oschina/article.js +1 -1
- package/clis/oschina/catalogs.js +1 -1
- package/clis/oschina/login.js +1 -1
- package/clis/oschina/stats.js +6 -6
- package/clis/oschina/whoami.js +1 -1
- package/clis/osv/query.js +1 -1
- package/clis/osv/utils.js +1 -1
- package/clis/osv/vulnerability.js +1 -1
- package/clis/packagist/package.js +1 -1
- package/clis/packagist/search.js +1 -1
- package/clis/packagist/utils.js +1 -1
- package/clis/pinterest/api.js +1 -1
- package/clis/pinterest/auth.js +1 -1
- package/clis/pinterest/boards.js +1 -1
- package/clis/pinterest/client.js +6 -6
- package/clis/pinterest/publish.js +5 -5
- package/clis/pixiv/auth.js +2 -2
- package/clis/pixiv/download.js +1 -1
- package/clis/pixiv/illusts.js +1 -1
- package/clis/pixiv/search.js +1 -1
- package/clis/pixiv/utils.js +3 -3
- package/clis/powerchina/auth.js +2 -2
- package/clis/powerchina/search.js +1 -1
- package/clis/producthunt/browse.js +2 -2
- package/clis/producthunt/hot.js +2 -2
- package/clis/producthunt/posts.js +1 -1
- package/clis/producthunt/today.js +1 -1
- package/clis/producthunt/utils.js +1 -1
- package/clis/pypi/downloads.js +1 -1
- package/clis/pypi/package.js +1 -1
- package/clis/pypi/utils.js +1 -1
- package/clis/qiita/auth.js +1 -1
- package/clis/qiita/gql.js +6 -6
- package/clis/qiita/publish.js +4 -4
- package/clis/qiita/stats.js +4 -4
- package/clis/qoder/_utils.js +16 -16
- package/clis/qoder/composer.js +1 -1
- package/clis/qoder/quest.js +1 -1
- package/clis/qoder/ui.js +14 -14
- package/clis/quark/auth.js +2 -2
- package/clis/quark/utils.js +2 -2
- package/clis/quora/answer-comments.js +3 -3
- package/clis/quora/create-answer.js +4 -4
- package/clis/quora/create-question.js +3 -3
- package/clis/quora/shared.js +17 -17
- package/clis/quora/whoami.js +1 -1
- package/clis/qwen/ask.js +1 -1
- package/clis/qwen/auth.js +3 -3
- package/clis/qwen/detail.js +1 -1
- package/clis/qwen/image.js +5 -5
- package/clis/qwen/status.js +1 -1
- package/clis/qwen/utils.js +16 -16
- package/clis/reddit/home.js +3 -3
- package/clis/reddit/read.js +10 -10
- package/clis/reddit/reply.js +4 -4
- package/clis/reddit/submit.js +11 -11
- package/clis/reddit/subreddit-info.js +3 -3
- package/clis/reddit/subscribed.js +4 -4
- package/clis/reddit/whoami.js +2 -2
- package/clis/rednote/comments.js +1 -1
- package/clis/rednote/download.js +1 -1
- package/clis/rednote/feed.js +1 -1
- package/clis/rednote/note.js +1 -1
- package/clis/rednote/notifications.js +2 -2
- package/clis/rednote/search.js +2 -2
- package/clis/rest-countries/country.js +1 -1
- package/clis/rest-countries/region.js +1 -1
- package/clis/rest-countries/utils.js +1 -1
- package/clis/reuters/article-detail.js +1 -1
- package/clis/reuters/auth.js +3 -3
- package/clis/reuters/search.js +1 -1
- package/clis/reuters/utils.js +4 -4
- package/clis/rfc/rfc.js +1 -1
- package/clis/rfc/utils.js +1 -1
- package/clis/rubygems/gem.js +1 -1
- package/clis/rubygems/search.js +1 -1
- package/clis/rubygems/utils.js +1 -1
- package/clis/segmentfault/article.js +3 -3
- package/clis/segmentfault/channels.js +1 -1
- package/clis/segmentfault/login.js +1 -1
- package/clis/segmentfault/stats.js +4 -4
- package/clis/segmentfault/tags.js +1 -1
- package/clis/segmentfault/whoami.js +1 -1
- package/clis/semanticscholar/citations.js +1 -1
- package/clis/semanticscholar/paper.js +1 -1
- package/clis/semanticscholar/recommendations.js +1 -1
- package/clis/semanticscholar/search.js +1 -1
- package/clis/semanticscholar/utils.js +1 -1
- package/clis/sinafinance/news.js +1 -1
- package/clis/sinafinance/stock-rank.js +1 -1
- package/clis/sinafinance/stock.js +1 -1
- package/clis/slock/attachment-download.js +1 -1
- package/clis/slock/attachment-upload.js +7 -7
- package/clis/slock/attachment-url.js +1 -1
- package/clis/slock/auth-verify.js +1 -1
- package/clis/slock/bookmark-add.js +1 -1
- package/clis/slock/bookmark-remove.js +1 -1
- package/clis/slock/channel-action.js +1 -1
- package/clis/slock/channel-create.js +1 -1
- package/clis/slock/channel-files.js +1 -1
- package/clis/slock/channel-list.js +1 -1
- package/clis/slock/channel-mark.js +1 -1
- package/clis/slock/channel-members.js +1 -1
- package/clis/slock/channel-unarchive.js +1 -1
- package/clis/slock/dm-list.js +1 -1
- package/clis/slock/errors.js +1 -1
- package/clis/slock/in-page.js +28 -28
- package/clis/slock/inbox-done.js +5 -5
- package/clis/slock/inbox.js +1 -1
- package/clis/slock/message-read.js +22 -22
- package/clis/slock/message-search.js +10 -10
- package/clis/slock/message-send.js +25 -25
- package/clis/slock/reaction-add.js +1 -1
- package/clis/slock/reaction-remove.js +1 -1
- package/clis/slock/resolve.js +1 -1
- package/clis/slock/server-list.js +2 -2
- package/clis/slock/task-claim.js +4 -4
- package/clis/slock/task-convert.js +13 -13
- package/clis/slock/task-create.js +1 -1
- package/clis/slock/task-delete.js +5 -5
- package/clis/slock/task-get.js +5 -5
- package/clis/slock/task-list-server.js +4 -4
- package/clis/slock/task-list.js +5 -5
- package/clis/slock/task-status.js +3 -3
- package/clis/slock/task-unclaim.js +3 -3
- package/clis/slock/thread-follow.js +1 -1
- package/clis/slock/thread-state.js +1 -1
- package/clis/slock/unread-summary.js +5 -5
- package/clis/slock/whoami.js +1 -1
- package/clis/smzdm/search.js +3 -3
- package/clis/sohu/article.js +1 -1
- package/clis/sohu/attributes.js +1 -1
- package/clis/sohu/categories.js +1 -1
- package/clis/sohu/channels.js +1 -1
- package/clis/sohu/columns.js +1 -1
- package/clis/sohu/login.js +1 -1
- package/clis/sohu/stats.js +3 -3
- package/clis/sohu/topics.js +1 -1
- package/clis/sohu/whoami.js +1 -1
- package/clis/spotify/spotify.js +1 -1
- package/clis/stackoverflow/read.js +6 -6
- package/clis/stackoverflow/related.js +1 -1
- package/clis/stackoverflow/tag.js +1 -1
- package/clis/stackoverflow/user.js +1 -1
- package/clis/stackoverflow/utils.js +1 -1
- package/clis/steam/app.js +1 -1
- package/clis/steam/search.js +1 -1
- package/clis/steam/utils.js +1 -1
- package/clis/substack/auth.js +2 -2
- package/clis/substack/post-utils.js +2 -2
- package/clis/substack/publish.js +5 -5
- package/clis/suno/auth.js +2 -2
- package/clis/suno/download.js +5 -5
- package/clis/suno/generate.js +3 -3
- package/clis/suno/list.js +1 -1
- package/clis/suno/status.js +1 -1
- package/clis/suno/utils.js +29 -29
- package/clis/telegram/send.js +7 -7
- package/clis/telegram/shared.js +2 -2
- package/clis/telegram/whoami.js +1 -1
- package/clis/test-utils.js +1 -1
- package/clis/threads/post.js +23 -23
- package/clis/threads/shared.js +3 -3
- package/clis/threads/whoami.js +1 -1
- package/clis/tieba/hot.js +3 -3
- package/clis/tieba/posts.js +1 -1
- package/clis/tieba/read.js +2 -2
- package/clis/tieba/search.js +3 -3
- package/clis/tieba/utils.js +1 -1
- package/clis/tiktok/comment.js +2 -2
- package/clis/tiktok/creator-videos.js +3 -3
- package/clis/tiktok/explore.js +3 -3
- package/clis/tiktok/follow.js +8 -8
- package/clis/tiktok/following.js +4 -4
- package/clis/tiktok/friends.js +7 -7
- package/clis/tiktok/live.js +3 -3
- package/clis/tiktok/notifications.js +6 -6
- package/clis/tiktok/publish.js +17 -17
- package/clis/tiktok/unfollow.js +4 -4
- package/clis/tiktok/user.js +2 -2
- package/clis/tiktok/utils.js +1 -1
- package/clis/toutiao/article.js +1 -1
- package/clis/toutiao/articles.js +2 -2
- package/clis/toutiao/auth.js +2 -2
- package/clis/toutiao/hot.js +1 -1
- package/clis/toutiao/recommend.js +1 -1
- package/clis/toutiao/utils.js +2 -2
- package/clis/trae-solo/_actions.js +4 -4
- package/clis/trae-solo/_fs.js +5 -5
- package/clis/trae-solo/_state.js +2 -2
- package/clis/trae-solo/automation.js +4 -4
- package/clis/trae-solo/mode.js +4 -4
- package/clis/trae-solo/model.js +4 -4
- package/clis/trae-solo/renderer-storage.js +4 -4
- package/clis/trae-solo/settings.js +1 -1
- package/clis/trae-solo/skill-fs.js +1 -1
- package/clis/trae-solo/skill.js +12 -12
- package/clis/trae-solo/state-fs.js +2 -2
- package/clis/trae-solo/task-fs.js +5 -5
- package/clis/trae-solo/workspaces-fs.js +1 -1
- package/clis/tumblr/auth.js +2 -2
- package/clis/tumblr/publish.js +3 -3
- package/clis/tvmaze/search.js +1 -1
- package/clis/tvmaze/show.js +1 -1
- package/clis/tvmaze/utils.js +1 -1
- package/clis/twitter/accept.js +7 -7
- package/clis/twitter/article.js +7 -7
- package/clis/twitter/bookmark-folder.js +3 -3
- package/clis/twitter/bookmark-folders.js +3 -3
- package/clis/twitter/bookmarks.js +4 -4
- package/clis/twitter/delete.js +5 -5
- package/clis/twitter/device-follow.js +3 -3
- package/clis/twitter/dm-list.js +1 -1
- package/clis/twitter/dm-read.js +1 -1
- package/clis/twitter/dm-send.js +5 -5
- package/clis/twitter/dm-shared.js +3 -3
- package/clis/twitter/download.js +6 -6
- package/clis/twitter/followers.js +5 -5
- package/clis/twitter/following.js +2 -2
- package/clis/twitter/like.js +3 -3
- package/clis/twitter/likes.js +8 -8
- package/clis/twitter/list-add-core.js +9 -9
- package/clis/twitter/list-create.js +5 -5
- package/clis/twitter/list-remove-core.js +9 -9
- package/clis/twitter/list-tweets.js +7 -7
- package/clis/twitter/lists.js +6 -6
- package/clis/twitter/notifications.js +2 -2
- package/clis/twitter/post.js +24 -24
- package/clis/twitter/profile.js +7 -7
- package/clis/twitter/quote.js +7 -7
- package/clis/twitter/reply-dm.js +7 -7
- package/clis/twitter/reply.js +12 -12
- package/clis/twitter/retweet.js +3 -3
- package/clis/twitter/scheduled-delete.js +3 -3
- package/clis/twitter/scheduled-list.js +2 -2
- package/clis/twitter/scheduled-utils.js +3 -3
- package/clis/twitter/search.js +5 -5
- package/clis/twitter/shared.js +6 -6
- package/clis/twitter/thread.js +4 -4
- package/clis/twitter/timeline.js +3 -3
- package/clis/twitter/trending.js +2 -2
- package/clis/twitter/tweets.js +11 -11
- package/clis/twitter/unlike.js +3 -3
- package/clis/twitter/unretweet.js +3 -3
- package/clis/twitter/utils.js +6 -6
- package/clis/upwork/detail.js +2 -2
- package/clis/upwork/feed.js +2 -2
- package/clis/upwork/search.js +2 -2
- package/clis/upwork/utils.js +1 -1
- package/clis/v2ex/auth.js +2 -2
- package/clis/v2ex/daily.js +3 -3
- package/clis/v2ex/me.js +2 -2
- package/clis/v2ex/notifications.js +2 -2
- package/clis/vk/post.js +1 -1
- package/clis/vk/shared.js +2 -2
- package/clis/vk/whoami.js +1 -1
- package/clis/web/read.js +8 -8
- package/clis/wechat-channels/auth.js +2 -2
- package/clis/wechat-channels/publish.js +30 -30
- package/clis/weibo/article.js +1 -1
- package/clis/weibo/auth.js +3 -3
- package/clis/weibo/comments.js +1 -1
- package/clis/weibo/delete.js +2 -2
- package/clis/weibo/feed.js +3 -3
- package/clis/weibo/hot.js +1 -1
- package/clis/weibo/publish.js +10 -10
- package/clis/weibo/search.js +2 -2
- package/clis/weibo/user-posts.js +3 -3
- package/clis/weibo/user.js +2 -2
- package/clis/weibo/utils.js +3 -3
- package/clis/weixin/article.js +1 -1
- package/clis/weixin/create-draft.js +26 -26
- package/clis/weixin/download.js +2 -2
- package/clis/weixin/login.js +1 -1
- package/clis/weixin/search.js +2 -2
- package/clis/weixin/stats.js +3 -3
- package/clis/weixin/whoami.js +1 -1
- package/clis/weread/ai-outline.js +2 -2
- package/clis/weread/book-search.js +2 -2
- package/clis/weread/book.js +2 -2
- package/clis/weread/notebooks.js +1 -1
- package/clis/weread/search.js +1 -1
- package/clis/weread/shelf.js +1 -1
- package/clis/weread/utils.js +6 -6
- package/clis/weread-official/book.js +1 -1
- package/clis/weread-official/discover.js +1 -1
- package/clis/weread-official/list-apis.js +1 -1
- package/clis/weread-official/notes.js +1 -1
- package/clis/weread-official/readdata.js +1 -1
- package/clis/weread-official/review.js +1 -1
- package/clis/weread-official/search.js +1 -1
- package/clis/weread-official/shelf.js +1 -1
- package/clis/weread-official/utils.js +1 -1
- package/clis/wikidata/entity.js +1 -1
- package/clis/wikidata/search.js +1 -1
- package/clis/wikidata/utils.js +1 -1
- package/clis/wikipedia/page.js +1 -1
- package/clis/wikipedia/trending.js +1 -1
- package/clis/wikipedia/utils.js +1 -1
- package/clis/wordpress/login.js +1 -1
- package/clis/wordpress/publish.js +1 -1
- package/clis/wordpress/shared.js +3 -3
- package/clis/wordpress/whoami.js +1 -1
- package/clis/woshipm/article.js +1 -1
- package/clis/woshipm/login.js +1 -1
- package/clis/woshipm/stats.js +4 -4
- package/clis/woshipm/whoami.js +1 -1
- package/clis/wttr/current.js +1 -1
- package/clis/wttr/forecast.js +1 -1
- package/clis/wttr/utils.js +1 -1
- package/clis/xianyu/collect.js +1 -1
- package/clis/xianyu/inbox.js +1 -1
- package/clis/xianyu/item-stats.js +2 -2
- package/clis/xianyu/location.js +1 -1
- package/clis/xianyu/manage.js +1 -1
- package/clis/xianyu/messages.js +1 -1
- package/clis/xianyu/mtop.js +5 -5
- package/clis/xianyu/order.js +1 -1
- package/clis/xianyu/promote-stats.js +2 -2
- package/clis/xianyu/publish.js +17 -17
- package/clis/xianyu/rate.js +1 -1
- package/clis/xianyu/reply.js +1 -1
- package/clis/xianyu/search.js +8 -8
- package/clis/xianyu/seller-data.js +1 -1
- package/clis/xianyu/seller-list.js +1 -1
- package/clis/xianyu/user.js +1 -1
- package/clis/xiaoe/catalog.js +2 -2
- package/clis/xiaoe/content.js +2 -2
- package/clis/xiaoe/courses.js +2 -2
- package/clis/xiaohongshu/ask.js +6 -6
- package/clis/xiaohongshu/comments.js +6 -6
- package/clis/xiaohongshu/creator-note-detail.js +7 -7
- package/clis/xiaohongshu/creator-notes-summary.js +1 -1
- package/clis/xiaohongshu/creator-notes.js +13 -13
- package/clis/xiaohongshu/creator-profile.js +2 -2
- package/clis/xiaohongshu/creator-stats.js +2 -2
- package/clis/xiaohongshu/delete-note.js +7 -7
- package/clis/xiaohongshu/download.js +4 -4
- package/clis/xiaohongshu/feed.js +2 -2
- package/clis/xiaohongshu/follow.js +3 -3
- package/clis/xiaohongshu/human.js +3 -3
- package/clis/xiaohongshu/note-helpers.js +1 -1
- package/clis/xiaohongshu/note.js +2 -2
- package/clis/xiaohongshu/notifications.js +1 -1
- package/clis/xiaohongshu/publish-video.js +8 -8
- package/clis/xiaohongshu/publish.js +59 -59
- package/clis/xiaohongshu/search.js +8 -8
- package/clis/xiaohongshu/unfollow.js +4 -4
- package/clis/xiaohongshu/user-helpers.js +1 -1
- package/clis/xiaohongshu/user.js +2 -2
- package/clis/xiaoyuzhou/auth.js +3 -3
- package/clis/xiaoyuzhou/download.js +1 -1
- package/clis/xiaoyuzhou/utils.js +1 -1
- package/clis/xueqiu/article.js +4 -4
- package/clis/xueqiu/comments.js +4 -4
- package/clis/xueqiu/danjuan-utils.js +4 -4
- package/clis/xueqiu/earnings-date.js +1 -1
- package/clis/xueqiu/events.js +3 -3
- package/clis/xueqiu/hashtags.js +3 -3
- package/clis/xueqiu/stocks.js +3 -3
- package/clis/xueqiu/users.js +3 -3
- package/clis/xueqiu/utils.js +3 -3
- package/clis/yahoo-finance/quote.js +1 -1
- package/clis/yollomi/background.js +1 -1
- package/clis/yollomi/edit.js +1 -1
- package/clis/yollomi/face-swap.js +1 -1
- package/clis/yollomi/generate.js +1 -1
- package/clis/yollomi/object-remover.js +1 -1
- package/clis/yollomi/remove-bg.js +1 -1
- package/clis/yollomi/restore.js +1 -1
- package/clis/yollomi/try-on.js +1 -1
- package/clis/yollomi/upload.js +4 -4
- package/clis/yollomi/upscale.js +1 -1
- package/clis/yollomi/utils.js +4 -4
- package/clis/yollomi/video.js +1 -1
- package/clis/youtube/channel.js +4 -4
- package/clis/youtube/feed.js +2 -2
- package/clis/youtube/like.js +5 -5
- package/clis/youtube/playlist.js +7 -7
- package/clis/youtube/publish.js +11 -11
- package/clis/youtube/search.js +3 -3
- package/clis/youtube/subscribe.js +7 -7
- package/clis/youtube/subscriptions.js +1 -1
- package/clis/youtube/transcript-group.js +2 -2
- package/clis/youtube/transcript.js +13 -13
- package/clis/youtube/unlike.js +5 -5
- package/clis/youtube/unsubscribe.js +7 -7
- package/clis/youtube/utils.js +3 -3
- package/clis/youtube/video.js +4 -4
- package/clis/youtube/watch-later.js +2 -2
- package/clis/yuanbao/ask.js +18 -18
- package/clis/yuanbao/detail.js +1 -1
- package/clis/yuanbao/read.js +1 -1
- package/clis/yuanbao/shared.js +9 -9
- package/clis/yuanbao/status.js +1 -1
- package/clis/yuque/article.js +1 -1
- package/clis/yuque/whoami.js +1 -1
- package/clis/zhihu/answer-comments.js +2 -2
- package/clis/zhihu/answer-detail.js +3 -3
- package/clis/zhihu/answer.js +1 -1
- package/clis/zhihu/article-transform.js +1 -1
- package/clis/zhihu/article.js +1 -1
- package/clis/zhihu/auth.js +2 -2
- package/clis/zhihu/collection.js +3 -3
- package/clis/zhihu/collections.js +3 -3
- package/clis/zhihu/download.js +2 -2
- package/clis/zhihu/image-profile.js +6 -6
- package/clis/zhihu/paginate.js +3 -3
- package/clis/zhihu/pin.js +4 -4
- package/clis/zhihu/question.js +3 -3
- package/clis/zhihu/recommend.js +3 -3
- package/clis/zhihu/search.js +3 -3
- package/clis/zhihu/stats.js +3 -3
- package/clis/zhihu/user-arg.js +1 -1
- package/clis/zhihu/write-shared.js +7 -7
- package/clis/zlibrary/utils.js +6 -6
- package/clis/zsxq/auth.js +3 -3
- package/clis/zsxq/search.js +1 -1
- package/clis/zsxq/topic.js +1 -1
- package/clis/zsxq/utils.js +5 -5
- package/dist/src/adapter-source.js +1 -1
- package/dist/src/browser/analyze.js +1 -1
- package/dist/src/browser/article-extract.js +2 -2
- package/dist/src/browser/ax-snapshot.js +2 -2
- package/dist/src/browser/base-page.js +25 -25
- package/dist/src/browser/bridge.js +1 -1
- package/dist/src/browser/cdp.js +1 -1
- package/dist/src/browser/daemon-client.js +1 -1
- package/dist/src/browser/daemon-lifecycle.js +7 -7
- package/dist/src/browser/dom-helpers.js +35 -35
- package/dist/src/browser/dom-snapshot.js +19 -19
- package/dist/src/browser/errors.js +3 -3
- package/dist/src/browser/extract.js +5 -5
- package/dist/src/browser/find.js +13 -13
- package/dist/src/browser/fingerprint.js +2 -2
- package/dist/src/browser/html-tree.js +6 -6
- package/dist/src/browser/managed-chrome.js +1 -1
- package/dist/src/browser/network-cache.js +1 -1
- package/dist/src/browser/network-key.js +1 -1
- package/dist/src/browser/page.js +7 -7
- package/dist/src/browser/profile.js +2 -2
- package/dist/src/browser/proxy-test.js +8 -8
- package/dist/src/browser/shape-filter.js +1 -1
- package/dist/src/browser/shape.js +1 -1
- package/dist/src/browser/stealth.js +3 -3
- package/dist/src/browser/tabs.js +2 -2
- package/dist/src/browser/target-errors.js +1 -1
- package/dist/src/browser/target-resolver.js +23 -23
- package/dist/src/browser/trace.js +2 -2
- package/dist/src/browser/utils.js +1 -1
- package/dist/src/browser/verify-fixture.js +2 -2
- package/dist/src/browser-session-lock.js +1 -1
- package/dist/src/build-manifest.js +11 -11
- package/dist/src/capabilityRouting.js +1 -1
- package/dist/src/cli-argv-preprocess.js +1 -1
- package/dist/src/cli.js +32 -32
- package/dist/src/commanderAdapter.js +3 -3
- package/dist/src/commands/auth.js +3 -3
- package/dist/src/commands/daemon.js +1 -1
- package/dist/src/completion-fast.js +1 -1
- package/dist/src/completion.js +1 -1
- package/dist/src/constants.js +1 -1
- package/dist/src/convention-audit.js +2 -2
- package/dist/src/daemon-utils.js +1 -1
- package/dist/src/daemon.js +1 -1
- package/dist/src/discovery.js +2 -2
- package/dist/src/doctor.js +9 -9
- package/dist/src/download/article-download.js +15 -15
- package/dist/src/download/index.js +4 -4
- package/dist/src/download/media-download.js +1 -1
- package/dist/src/download/progress.js +3 -3
- package/dist/src/electron-apps.js +1 -1
- package/dist/src/errors.js +2 -2
- package/dist/src/execution.js +2 -2
- package/dist/src/external.js +1 -1
- package/dist/src/help.js +8 -8
- package/dist/src/hooks.js +1 -1
- package/dist/src/interceptor.js +21 -21
- package/dist/src/launcher.js +7 -7
- package/dist/src/logger.js +8 -8
- package/dist/src/main.js +7 -7
- package/dist/src/observation/artifact.js +5 -5
- package/dist/src/observation/retention.js +1 -1
- package/dist/src/output.js +2 -2
- package/dist/src/package-paths.js +1 -1
- package/dist/src/pipeline/executor.js +1 -1
- package/dist/src/pipeline/registry.js +1 -1
- package/dist/src/pipeline/steps/browser.js +1 -1
- package/dist/src/pipeline/steps/download.js +1 -1
- package/dist/src/pipeline/steps/fetch.js +6 -6
- package/dist/src/pipeline/steps/intercept.js +1 -1
- package/dist/src/pipeline/steps/tap.js +17 -17
- package/dist/src/pipeline/steps/transform.js +1 -1
- package/dist/src/pipeline/template.js +1 -1
- package/dist/src/plugin-manifest.js +1 -1
- package/dist/src/plugin-scaffold.js +19 -19
- package/dist/src/plugin.js +12 -12
- package/dist/src/rate-limit.js +1 -1
- package/dist/src/registry.js +1 -1
- package/dist/src/runtime-detect.js +1 -1
- package/dist/src/runtime.js +1 -1
- package/dist/src/scripts/framework.js +1 -1
- package/dist/src/scripts/interact.js +1 -1
- package/dist/src/scripts/store.js +1 -1
- package/dist/src/serialization.js +2 -2
- package/dist/src/session-lease.js +1 -1
- package/dist/src/snapshotFormatter.js +2 -2
- package/dist/src/tui.js +12 -12
- package/dist/src/user-runtime.js +1 -1
- package/dist/src/utils.d.ts +12 -0
- package/dist/src/utils.js +4 -4
- package/dist/src/validate.js +2 -2
- package/dist/src/verify.js +2 -2
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
package/clis/instagram/reel.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as w from"node:fs";import*as A from"node:os";import*as u from"node:path";import{Page as L}from"@jackwener/opencli/browser/page";import{cli as V,Strategy as k}from"@jackwener/opencli/registry";import{ArgumentError as f,AuthRequiredError as R,CommandExecutionError as a}from"@jackwener/opencli/errors";import{buildClickActionJs as x,buildEnsureComposerOpenJs as M,buildInspectUploadStageJs as q}from"./post.js";import{resolveInstagramRuntimeInfo as _}from"./_shared/runtime-info.js";import{setInputFiles as H}from"../_shared/file-inject.js";const p="https://www.instagram.com/",O=new Set([".mp4"]),S=600;function N(e){if(!e)throw new a("Browser session required for instagram reel");return e}async function U(e,t=!1){if(t){await e.goto(`${p}?__opencli_reset=${Date.now()}`);await e.wait({time:1})}await e.goto(p)}function J(e){const t=u.resolve(String(e||"").trim());if(!t)throw new f("Video path cannot be empty");if(!w.existsSync(t))throw new f(`Video file not found: ${t}`);const r=u.extname(t).toLowerCase();if(!O.has(r))throw new f(`Unsupported video format: ${r}`,"Supported formats: .mp4");return t}function B(e){if(e.video===void 0)throw new f('Argument "video" is required.',"Provide --video /path/to/file.mp4")}function D(e){return[{status:"✅ Posted",detail:"Single reel shared successfully",url:e}]}function F(e){if(!(e instanceof a))return!1;return e.message==="Instagram reel upload input not found"||e.message==="Instagram reel preview did not appear after upload"||e.message==="Instagram reel upload failed"}function j(e){const t=u.extname(e).toLowerCase()||".mp4";return u.join(A.tmpdir(),`opencli-instagram-video-real${t}`)}function P(e){const t=u.basename(e);if(/^[a-zA-Z0-9._-]+$/.test(t))return{originalPath:e,uploadPath:e};const r=j(e);w.copyFileSync(e,r);return{originalPath:e,uploadPath:r,cleanupPath:r}}async function W(e){const t=await e.evaluate(M());if(!t?.ok){if(t?.reason==="auth")throw new R("www.instagram.com","Instagram login required before posting a reel");throw new a("Failed to open Instagram reel composer")}for(let r=0;r<12;r+=1){if((await e.evaluate(`
|
|
2
2
|
(() => {
|
|
3
3
|
const isVisible = (el) => {
|
|
4
4
|
if (!(el instanceof HTMLElement)) return false;
|
|
@@ -17,7 +17,7 @@ import*as L from"node:fs";import*as E from"node:os";import*as F from"node:path";
|
|
|
17
17
|
});
|
|
18
18
|
return { ok: inputs.length > 0 };
|
|
19
19
|
})()
|
|
20
|
-
`))?.ok)return;if(
|
|
20
|
+
`))?.ok)return;if(r<11)await e.wait({time:0.5})}throw new a("Instagram reel upload input not found","Open the new-post composer in a logged-in browser session and retry")}async function G(e){for(let t=0;t<4;t+=1){if(!(await e.evaluate(`
|
|
21
21
|
(() => {
|
|
22
22
|
const isVisible = (el) => {
|
|
23
23
|
if (!(el instanceof HTMLElement)) return false;
|
|
@@ -55,7 +55,7 @@ import*as L from"node:fs";import*as E from"node:os";import*as F from"node:path";
|
|
|
55
55
|
}
|
|
56
56
|
return { ok: false };
|
|
57
57
|
})()
|
|
58
|
-
`))?.ok)return;await
|
|
58
|
+
`))?.ok)return;await e.wait({time:0.5})}}async function X(e){const t=await e.evaluate(`
|
|
59
59
|
(() => {
|
|
60
60
|
const isVisible = (el) => {
|
|
61
61
|
if (!(el instanceof HTMLElement)) return false;
|
|
@@ -87,13 +87,13 @@ import*as L from"node:fs";import*as E from"node:os";import*as F from"node:path";
|
|
|
87
87
|
|
|
88
88
|
return { ok: selectors.length > 0, selectors };
|
|
89
89
|
})()
|
|
90
|
-
`);if(!
|
|
90
|
+
`);if(!t?.ok||!Array.isArray(t.selectors)||t.selectors.length===0)throw new a("Instagram reel upload input not found","Open the new-post composer in a logged-in browser session and retry");return t.selectors}async function z(e,t,r){await H(e,r,[t])}async function K(e,t){const r=await e.evaluate(`
|
|
91
91
|
(() => {
|
|
92
|
-
const input = document.querySelector(${JSON.stringify(
|
|
92
|
+
const input = document.querySelector(${JSON.stringify(t)});
|
|
93
93
|
if (!(input instanceof HTMLInputElement)) return { count: null };
|
|
94
94
|
return { count: input.files?.length || 0 };
|
|
95
95
|
})()
|
|
96
|
-
`);if(
|
|
96
|
+
`);if(r?.count===null||r?.count===void 0)return null;return Number(r.count)}async function Z(e,t=20){let r="";for(let i=0;i<t*2;i+=1){const o=await e.evaluate(q());r=String(o?.detail||"").trim();if(o?.state==="preview")return;if(o?.state==="failed")throw new a("Instagram reel upload failed",o.detail?`Instagram rejected the reel upload: ${o.detail}`:"Instagram rejected the reel upload before the preview stage");if(i<t*2-1)await e.wait({time:0.5})}await e.screenshot({path:"/tmp/instagram_reel_preview_debug.png"});throw new a("Instagram reel preview did not appear after upload",r?`Inspect /tmp/instagram_reel_preview_debug.png. Last visible dialog text: ${r}`:"Inspect /tmp/instagram_reel_preview_debug.png for the upload state")}async function g(e,t,r="any"){const i=await e.evaluate(x(t,r));if(!i?.ok)throw new a(`Instagram action button not found: ${t.join(" / ")}`);return i.label||t[0]||""}async function Q(e,t,r="any"){return!!(await e.evaluate(x(t,r)))?.ok}function Y(){return`
|
|
97
97
|
(() => {
|
|
98
98
|
const isVisible = (el) => {
|
|
99
99
|
if (!(el instanceof HTMLElement)) return false;
|
|
@@ -127,7 +127,7 @@ import*as L from"node:fs";import*as E from"node:os";import*as F from"node:path";
|
|
|
127
127
|
}
|
|
128
128
|
return { state: 'pending', detail: text };
|
|
129
129
|
})()
|
|
130
|
-
`}async function
|
|
130
|
+
`}async function v(e,t,r=20){for(let i=0;i<r*2;i+=1){const o=await e.evaluate(Y());if(o?.state===t)return;if(o?.state==="failed")throw new a("Instagram reel editor did not appear",o.detail?`Instagram reel flow failed: ${o.detail}`:"Instagram reel flow failed before the next editor stage");if(i<r*2-1)await e.wait({time:0.5})}throw new a(`Instagram reel ${t} editor did not appear`)}async function ee(e){return!!(await e.evaluate(`
|
|
131
131
|
(() => {
|
|
132
132
|
const isVisible = (el) => {
|
|
133
133
|
if (!(el instanceof HTMLElement)) return false;
|
|
@@ -199,9 +199,9 @@ import*as L from"node:fs";import*as E from"node:os";import*as F from"node:path";
|
|
|
199
199
|
}
|
|
200
200
|
return { ok: false };
|
|
201
201
|
})()
|
|
202
|
-
`))?.ok}async function
|
|
202
|
+
`))?.ok}async function te(e,t){return!!(await e.evaluate(`
|
|
203
203
|
(() => {
|
|
204
|
-
const target = ${JSON.stringify(
|
|
204
|
+
const target = ${JSON.stringify(t.trim())}.replace(/\\u00a0/g, ' ').replace(/\\s+/g, ' ').trim();
|
|
205
205
|
const isVisible = (el) => {
|
|
206
206
|
if (!(el instanceof HTMLElement)) return false;
|
|
207
207
|
const style = window.getComputedStyle(el);
|
|
@@ -253,7 +253,7 @@ import*as L from"node:fs";import*as E from"node:os";import*as F from"node:path";
|
|
|
253
253
|
}
|
|
254
254
|
return { ok: false };
|
|
255
255
|
})()
|
|
256
|
-
`))?.ok}async function
|
|
256
|
+
`))?.ok}async function re(e,t){if(!await ee(e))throw new a("Instagram reel caption editor did not appear");if(e.insertText)try{await e.insertText(t);await e.wait({time:0.3});await e.evaluate(`
|
|
257
257
|
(() => {
|
|
258
258
|
const isVisible = (el) => {
|
|
259
259
|
if (!(el instanceof HTMLElement)) return false;
|
|
@@ -288,7 +288,7 @@ import*as L from"node:fs";import*as E from"node:os";import*as F from"node:path";
|
|
|
288
288
|
}
|
|
289
289
|
return { ok: false };
|
|
290
290
|
})()
|
|
291
|
-
`);return}catch{}await
|
|
291
|
+
`);return}catch{}await e.evaluate(`
|
|
292
292
|
((content) => {
|
|
293
293
|
const createParagraph = (text) => ({
|
|
294
294
|
children: text
|
|
@@ -382,8 +382,8 @@ import*as L from"node:fs";import*as E from"node:os";import*as F from"node:path";
|
|
|
382
382
|
return { ok: true, mode: 'contenteditable' };
|
|
383
383
|
}
|
|
384
384
|
return { ok: false };
|
|
385
|
-
})(${JSON.stringify(
|
|
386
|
-
`)}async function
|
|
385
|
+
})(${JSON.stringify(t)})
|
|
386
|
+
`)}async function ne(e,t){for(let r=0;r<6;r+=1){if(await te(e,t))return;if(r<5)await e.wait({time:0.5})}throw new a("Instagram reel caption did not stick before sharing")}function ie(){return`
|
|
387
387
|
(() => {
|
|
388
388
|
const isVisible = (el) => {
|
|
389
389
|
if (!(el instanceof HTMLElement)) return false;
|
|
@@ -411,10 +411,10 @@ import*as L from"node:fs";import*as E from"node:os";import*as F from"node:path";
|
|
|
411
411
|
const settled = !shared && !composerOpen && !sharingVisible;
|
|
412
412
|
return { ok: shared, failed, settled, url: /\\/reel\\//.test(url) ? url : '' };
|
|
413
413
|
})()
|
|
414
|
-
`}async function
|
|
414
|
+
`}async function oe(e){let t=0;for(let r=0;r<120;r+=1){const i=await e.evaluate(ie());if(i?.failed)throw new a("Instagram reel share failed");if(i?.ok)return i.url||"";if(i?.settled){t+=1;if(t>=3)return""}else t=0;if(r<119)await e.wait({time:1})}throw new a("Instagram reel share confirmation did not appear")}async function E(e){return(await e.getCookies({domain:"instagram.com"})).find((r)=>r.name==="ds_user_id")?.value||""}async function T(e,t=""){if(t){const r=await _(e),i=await e.evaluate(`
|
|
415
415
|
(async () => {
|
|
416
|
-
const userId = ${JSON.stringify(
|
|
417
|
-
const appId = ${JSON.stringify(
|
|
416
|
+
const userId = ${JSON.stringify(t)};
|
|
417
|
+
const appId = ${JSON.stringify(r.appId||"")};
|
|
418
418
|
try {
|
|
419
419
|
const res = await fetch(
|
|
420
420
|
'https://www.instagram.com/api/v1/users/' + encodeURIComponent(userId) + '/info/',
|
|
@@ -431,7 +431,7 @@ import*as L from"node:fs";import*as E from"node:os";import*as F from"node:path";
|
|
|
431
431
|
return { ok: false };
|
|
432
432
|
}
|
|
433
433
|
})()
|
|
434
|
-
`);if(
|
|
434
|
+
`);if(i?.ok&&i.username)return new URL(`/${i.username}/`,p).toString()}return""}async function C(e){const t=await e.evaluate(`
|
|
435
435
|
(() => {
|
|
436
436
|
const isVisible = (el) => {
|
|
437
437
|
if (!(el instanceof HTMLElement)) return false;
|
|
@@ -449,4 +449,4 @@ import*as L from"node:fs";import*as E from"node:os";import*as F from"node:path";
|
|
|
449
449
|
.filter((href, index, arr) => arr.indexOf(href) === index);
|
|
450
450
|
return { hrefs };
|
|
451
451
|
})()
|
|
452
|
-
`);return Array.isArray(
|
|
452
|
+
`);return Array.isArray(t?.hrefs)?t.hrefs.filter(Boolean):[]}async function ae(e){const t=await E(e);if(!t)return new Set;const r=await T(e,t);if(!r)return new Set;try{await e.goto(r);await e.wait({time:3});return new Set(await C(e))}catch{return new Set}}async function le(e,t){const r=await e.getCurrentUrl?.();if(r&&/\/reel\//.test(r))return r;const i=await E(e),o=await T(e,i);if(!o)return"";await e.goto(o);await e.wait({time:4});for(let s=0;s<8;s+=1){const d=await C(e),n=d.find((l)=>l.includes("/reel/")&&!t.has(l))||d.find((l)=>!t.has(l))||"";if(n)return new URL(n,p).toString();if(s<7)await e.wait({time:1})}return""}V({site:"instagram",name:"reel",access:"write",description:"Post an Instagram reel video",domain:"www.instagram.com",strategy:k.UI,browser:!0,args:[{name:"video",required:!1,valueRequired:!0,help:"Path to a single .mp4 video file"},{name:"content",fromFile:!0,positional:!0,required:!1,help:"Caption text"},{name:"timeout",type:"int",required:!1,default:S,help:`Max seconds for the overall command (default: ${S})`}],columns:["status","detail","url"],validateArgs:B,func:async(e,t)=>{const r=N(e),i=J(t.video),o=String(t.content??"").trim(),s=P(i),d=async(n,l=new Set)=>{if(typeof n.startNetworkCapture==="function")await n.startNetworkCapture("/rupload_igvideo/|/api/v1/|/reel/|/clips/|/media/|/configure|/upload");await U(n,!0);await n.wait({time:2});await G(n);await W(n);await n.wait({time:2});const c=await X(n);let h=!1,m;for(const y of c)try{await z(n,s.uploadPath,y);if(await K(n,y)===0)throw new a("Instagram reel upload failed","The selected reel input never received the video file");await Z(n,10);h=!0;break}catch(b){m=b}if(!h)throw m instanceof Error?m:new a("Instagram reel preview did not appear after upload");await Q(n,["OK"],"any");await g(n,["Next","下一步"],"media");await v(n,"edit",20);await g(n,["Next","下一步"],"media");await v(n,"composer",20);if(o){await re(n,o);await ne(n,o)}await g(n,["Share","分享"],"caption");const I=await oe(n)||await le(n,l);return D(I)};try{if(!process.env.VITEST){const l=async()=>{const c=new L(`site:instagram-reel-${Date.now()}`);try{return await d(c,new Set)}finally{await c.closeWindow?.()}};try{return await l()}catch(c){if(!F(c))throw c;return await l()}}const n=await ae(r);return await d(r,n)}finally{if(s.cleanupPath)w.rmSync(s.cleanupPath,{force:!0})}}});
|
package/clis/instagram/story.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as p from"node:fs";import*as d from"node:path";import{ArgumentError as s,CommandExecutionError as l}from"@jackwener/opencli/errors";import{cli as f,Strategy as g}from"@jackwener/opencli/registry";import{publishStoryViaPrivateApi as w,resolveInstagramPrivatePublishConfig as h}from"./_shared/private-publish.js";import{resolveInstagramRuntimeInfo as y}from"./_shared/runtime-info.js";const v="https://www.instagram.com/",I=new Set([".jpg",".jpeg",".png",".webp"]),S=new Set([".mp4"]);function P(e){if(!e)throw new l("Browser session required for instagram story");return e}function R(e){if(e.media===void 0)throw new s('Argument "media" is required.',"Provide --media /path/to/file.jpg or --media /path/to/file.mp4")}function E(e){const t=String(e.media??"").trim().split(",").map((i)=>i.trim()).filter(Boolean);if(t.length===0)throw new s('Argument "media" is required.',"Provide --media /path/to/file.jpg or --media /path/to/file.mp4");if(t.length>1)throw new s("Instagram story currently supports a single media item.","Provide one image or one video path with --media");const r=d.resolve(t[0]);if(!p.existsSync(r))throw new s(`Story media file not found: ${r}`);const o=d.extname(r).toLowerCase();if(I.has(o))return{type:"image",filePath:r};if(S.has(o))return{type:"video",filePath:r};throw new s(`Unsupported story media format: ${o}`,"Supported formats: images (.jpg, .jpeg, .png, .webp) and videos (.mp4)")}async function k(e){return(await e.getCookies({domain:"instagram.com"})).find((t)=>t.name==="ds_user_id")?.value||""}async function A(e,a=""){if(!a)return"";const t=await y(e),r=await e.evaluate(`
|
|
2
2
|
(async () => {
|
|
3
|
-
const userId = ${JSON.stringify(
|
|
4
|
-
const appId = ${JSON.stringify(
|
|
3
|
+
const userId = ${JSON.stringify(a)};
|
|
4
|
+
const appId = ${JSON.stringify(t.appId||"")};
|
|
5
5
|
try {
|
|
6
6
|
const res = await fetch(
|
|
7
7
|
'https://www.instagram.com/api/v1/users/' + encodeURIComponent(userId) + '/info/',
|
|
@@ -18,4 +18,4 @@ import*as O from"node:fs";import*as L from"node:path";import{ArgumentError as F,
|
|
|
18
18
|
return { ok: false };
|
|
19
19
|
}
|
|
20
20
|
})()
|
|
21
|
-
`);return
|
|
21
|
+
`);return r?.ok&&r.username?r.username:""}function C(e,a){return[{status:"✅ Posted",detail:e.type==="video"?"Single video story shared successfully":"Single story shared successfully",url:a}]}f({site:"instagram",name:"story",access:"write",description:"Post a single Instagram story image or video",domain:"www.instagram.com",strategy:g.UI,browser:!0,args:[{name:"media",required:!1,valueRequired:!0,help:"Path to a single story image or video file"},{name:"timeout",type:"int",required:!1,default:300,help:"Max seconds for the overall command (default: 300)"}],columns:["status","detail","url"],validateArgs:R,func:async(e,a)=>{const t=P(e),r=E(a),o=await k(t),i=await h(t),n=await w({page:t,mediaItem:r,content:"",apiContext:i.apiContext,jazoest:i.jazoest,currentUserId:o}),m=await A(t,o),u=n.mediaPk||n.uploadId,c=m&&u?new URL(`/stories/${m}/${u}/`,v).toString():"";return C(r,c)}});
|
package/clis/instagram/user.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cli as
|
|
2
|
-
`).trim()}function
|
|
1
|
+
import{cli as V,Strategy as Q}from"@jackwener/opencli/registry";import{ArgumentError as m,AuthRequiredError as C,CommandExecutionError as d,EmptyResultError as Z}from"@jackwener/opencli/errors";const tt="936619743392459",D=12,A=1000,_=50,et="https://www.instagram.com",F="contains",k=["contains","regex"],nt=/^\d{4}-\d{2}-\d{2}$/,rt=/^\d{10}$/,ot=/^\d{13}$/;function Y(t,e){const{defaultValue:n,max:r,label:o}=e,i=t===void 0?n:Number(t);if(!Number.isInteger(i)||i<=0)throw new m(`${o} must be a positive integer`);if(i>r)throw new m(`${o} must be <= ${r}`);return i}function U(t){return String(t?.code||"").trim()}function b(t){return String(t||"").replace(/\s+/g," ").trim()}function it(t){return String(t||"").replace(/\r\n?/g,`
|
|
2
|
+
`).trim()}function L(t){const e=String(t||F).trim().toLowerCase();if(!k.includes(e))throw new m(`Invalid caption-filter-mode: ${t}. Supported values: contains, regex`);return e}function E(t,e){const{mode:n,caseSensitive:r,label:o}=e,i=b(t);if(!i)return null;if(n==="regex"){const a=r?"":"i";try{const s=new RegExp(i,a);return(f)=>s.test(b(f))}catch(s){throw new m(`Invalid ${o} regular expression: ${s?.message||s}`)}}const c=r?i:i.toLowerCase();return(a)=>{const s=b(a);return r?s.includes(c):s.toLowerCase().includes(c)}}function q(t){const e=L(t["caption-filter-mode"]),n=b(t["caption-filter"]||t.captionFilter),r=b(t["caption-reject"]||t.captionReject),o=t["caption-case-sensitive"]===!0||t.captionCaseSensitive===!0;if(e==="regex"&&!n&&!r)return null;if(!n&&!r)return null;const i=n?E(n,{mode:e,caseSensitive:o,label:"caption-filter"}):null,c=r?E(r,{mode:e,caseSensitive:o,label:"caption-reject"}):null;return{test(a){const s=b(a);if(c&&c(s))return!1;if(!i)return!0;return i(s)}}}function j(t){if(t?.media_type===1)return"photo";if(t?.media_type===2)return"video";return"carousel"}function z(t){const e=String(t?.product_type||"").toLowerCase();if(e==="clips"||e==="reel")return"reel";if(t?.is_reel_media)return"reel";return"p"}function H(t){const e=Number(t||0);return Number.isFinite(e)&&e>0?new Date(e*1000).toLocaleDateString():""}function B(t){const e=Number(t||0);return Number.isFinite(e)&&e>0?new Date(e*1000).toISOString():""}function J(t,e="p"){return t?`${et}/${e}/${t}/`:""}function W(t,e={}){const n=e.label||"date",r=String(t||"").trim();if(!nt.test(r))throw new m(`Invalid --${n}: ${JSON.stringify(t)}. Use YYYY-MM-DD.`);const o=new Date(`${r}T00:00:00`).getTime(),i=new Date(`${r}T23:59:59.999`).getTime();if(!Number.isFinite(o)||!Number.isFinite(i))throw new m(`Invalid --${n}: ${JSON.stringify(t)}. Use YYYY-MM-DD.`);return{startSec:Math.floor(o/1000),endSec:Math.floor(i/1000)}}function P(t,e={}){const n=e.label||"from",r=String(t||"").trim();if(!r)throw new m(`Missing --${n} timestamp`);if(rt.test(r))return Number(r);if(ot.test(r))return Math.floor(Number(r)/1000);const o=new Date(r).getTime();if(!Number.isFinite(o))throw new m(`Invalid --${n}: ${JSON.stringify(t)}. Use ISO 8601 like 2026-07-11T18:30:00+05:30 or Unix seconds.`);return Math.floor(o/1000)}function X(t){const e=String(t.date||"").trim(),n=String(t.from||"").trim(),r=String(t.to||"").trim();if(e&&(n||r))throw new m("Cannot combine --date with --from/--to. Use --date YYYY-MM-DD for a whole day, or --from/--to for an exact time range.");if(r&&!n)throw new m("Using --to requires --from.");if(e)return W(e,{label:"date"});if(!n&&!r)return null;const o=P(n,{label:"from"}),i=r?P(r,{label:"to"}):Number.POSITIVE_INFINITY;if(i<o)throw new m("--from must be earlier than or equal to --to.");return{startSec:o,endSec:i}}async function R(t,e){try{const n=await t.evaluate(async(r,o)=>{const c=await fetch(r,{credentials:"include",headers:{"X-IG-App-ID":o}}),a=await c.text();let s=null;try{s=a?JSON.parse(a):null}catch{s=null}return{ok:c.ok,status:c.status,text:a,data:s}},e,tt);if(!n||typeof n!=="object")throw Error("Instagram API returned no payload");return n}catch(n){throw new d(`Instagram API request failed for ${e}: ${n?.message||n}`)}}function y(t){const e=String(t?.text||"").toLowerCase();return Number(t?.status||0)===429||e.includes("rate limit")||e.includes("wait a few minutes")}function M(t){const e=Number(t?.status||0);if(e===401||e===403)return!0;const n=String(t?.text||"").toLowerCase();return n.includes("login")||n.includes("require_login")}function v(t,e){const n=U(t),r=z(t),o=t?.caption?.text||t?.caption||"";return{index:e,caption:it(o),likes:t?.like_count??0,comments:t?.comment_count??0,type:j(t),date:H(t?.taken_at),posted_at:B(t?.taken_at),kind:r,shortcode:n,media_id:String(t?.id||""),url:J(n,r)}}function O(t){return Array.isArray(t)?t:[]}function G(t,e){if(!e)return!0;const n=Number(t||0);if(!Number.isFinite(n)||n<=0)return!1;return n>=e.startSec&&n<=e.endSec}async function st(t,e,n,r){const o=[],i=new Set;let c="",a=!0;while(o.length<n&&a){const s=n-o.length,f=s>_?_:s,x=`https://www.instagram.com/api/v1/feed/user/${encodeURIComponent(e)}/?count=${f}`,S=c?`${x}&max_id=${encodeURIComponent(c)}`:x,l=await R(t,S);if(!l.ok){if(M(l))throw new C("www.instagram.com",l.text||`HTTP ${l.status}`);if(y(l))throw new d("Instagram feed request is rate limited","Wait a few minutes and retry.");throw new d("Failed to fetch user posts",`Instagram returned HTTP ${l.status} for ${S}`)}const u=l.data||{};if(!u||typeof u!=="object")throw new d("Instagram returned an unexpected response for user feed");const p=O(u.items);if(p.length===0)break;for(const w of p){const h=U(w);if(!h||i.has(h))continue;const g=w?.caption?.text||w?.caption||"";if(r&&!r.test(g))continue;i.add(h);o.push(v(w,o.length+1));if(o.length>=n)return o}if(!u.more_available){a=!1;break}const I=String(u.next_max_id||"").trim();if(!I||I===c)break;c=I;if(o.length<n)await t.wait({time:0.5})}return o}async function at(t,e,n,r,o){const i=[],c=new Set;let a="",s=!0;while(i.length<n&&s){const f=n-i.length,x=f>_?_:f,S=`https://www.instagram.com/api/v1/feed/user/${encodeURIComponent(e)}/?count=${x}`,l=a?`${S}&max_id=${encodeURIComponent(a)}`:S,u=await R(t,l);if(!u.ok){if(M(u))throw new C("www.instagram.com",u.text||`HTTP ${u.status}`);if(y(u))throw new d("Instagram feed request is rate limited","Wait a few minutes and retry.");throw new d("Failed to fetch user posts",`Instagram returned HTTP ${u.status} for ${l}`)}const p=u.data||{};if(!p||typeof p!=="object")throw new d("Instagram returned an unexpected response for user feed");const I=O(p.items);if(I.length===0)break;let w=!1;for(const g of I){const T=Number(g?.taken_at||0);if(Number.isFinite(T)&&T>0&&T<o.startSec){w=!0;break}const N=U(g);if(!N||c.has(N))continue;if(!G(T,o))continue;const K=g?.caption?.text||g?.caption||"";if(r&&!r.test(K))continue;c.add(N);i.push(v(g,i.length+1));if(i.length>=n)return i}if(w||!p.more_available){s=!1;break}const h=String(p.next_max_id||"").trim();if(!h||h===a)break;a=h;if(i.length<n)await t.wait({time:0.5})}return i}V({site:"instagram",name:"user",access:"read",description:"Get recent posts from an Instagram user",domain:"www.instagram.com",strategy:Q.COOKIE,browser:!0,navigateBefore:"https://www.instagram.com",args:[{name:"username",required:!0,positional:!0,help:"Instagram username"},{name:"limit",type:"int",default:D,help:`Number of posts (1-${A})`},{name:"date",default:"",help:"Fetch posts from one full local day. Format: YYYY-MM-DD. Cannot be combined with --from/--to."},{name:"from",default:"",help:"Fetch posts from this timestamp onward. Use ISO 8601 like 2026-07-11T18:30:00+05:30 or Unix seconds."},{name:"to",default:"",help:"Fetch posts up to this timestamp. Requires --from. Use ISO 8601 like 2026-07-12T18:30:00+05:30 or Unix seconds."},{name:"caption-filter-mode",default:F,choices:k,help:"Caption matching mode: contains or regex"},{name:"caption-filter",default:"",help:"Keep only posts whose caption matches this pattern"},{name:"caption-reject",default:"",help:"Drop posts whose caption matches this pattern (same mode as caption-filter-mode)"},{name:"caption-case-sensitive",type:"bool",default:!1,help:"Match captions case-sensitively"}],columns:["index","caption","likes","comments","type","date","posted_at","kind","shortcode","media_id","url"],func:async(t,e)=>{const n=String(e.username||"").trim().replace(/^@+/,"");if(!n)throw new m("Instagram username is required");const r=Y(e.limit,{defaultValue:D,max:A,label:"Instagram user limit"}),o=q(e),i=X(e),c=`https://www.instagram.com/api/v1/users/web_profile_info/?username=${encodeURIComponent(n)}`,a=await R(t,c);if(!a.ok){if(M(a))throw new C("www.instagram.com","Instagram login required to read user profile");if(y(a))throw new d("Instagram profile request is rate limited","Wait a few minutes and retry.");throw new d("Failed to resolve Instagram user",`Instagram returned HTTP ${a.status} for profile lookup`)}const s=String(a.data?.data?.user?.id||"").trim();if(!s)throw new d(`Instagram user not found: ${n}`);const f=i?await at(t,s,r,o,i):await st(t,s,r,o);if(f.length===0)throw new Z("instagram user",`No posts found for ${n}`);return f},__test__:{DEFAULT_LIMIT:D,MAX_LIMIT:A,DEFAULT_CAPTION_FILTER_MODE:F,BATCH_LIMIT:_,parseFeedItems:O,normalizeCaptionFilterMode:L,compileCaptionMatcher:E,makeCaptionFilter:q,resolvePostKind:z,normalizeFeedItem:v,normalizeMediaType:j,requirePositiveBoundedInt:Y,buildInstagramPostUrl:J,parseDayBounds:W,parseTimestampArg:P,resolveTimeWindow:X,isWithinTimeWindow:G,isAuthRequired:M,isRateLimited:y,formatInstagramDate:H,formatInstagramPostedAt:B}});
|
package/clis/jd/item.js
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import{cli as
|
|
2
|
-
`).map((
|
|
3
|
-
${
|
|
4
|
-
${
|
|
5
|
-
const detectJdPageState = ${
|
|
6
|
-
return detectJdPageState(${JSON.stringify(
|
|
7
|
-
})()`).catch(()=>null))?.looksBlocked){await
|
|
1
|
+
import{cli as N,Strategy as R}from"@jackwener/opencli/registry";import{AuthRequiredError as H,CommandExecutionError as j}from"@jackwener/opencli/errors";function E(t,e){const r=Number(t);return Number.isFinite(r)&&r>=0?Math.floor(r):e}function v(t){const e=String(t||"").trim(),r=e.match(/item\.jd\.com\/(\d+)\.html/i);if(r)return r[1];if(/^\d+$/.test(e))return e;const o=e.match(/(?:skuId|sku|wareId|productId)[=:](\d+)/i);if(o)return o[1];return e}function g(t){if(!t||typeof t!=="string")return"";let e=t.trim();if(!e)return"";if(e.startsWith("//"))e=`https:${e}`;if(!/^https?:\/\//.test(e))return"";return e}function m(t){return g(t).replace(/\/pcpubliccms\/s\d+x\d+_jfs\//,"/pcpubliccms/jfs/").replace(/\/(n\d+)\/s\d+x\d+_jfs\//,"/$1/jfs/").replace(/\/s\d+x\d+_jfs\//,"/jfs/")}function F(t){const e=m(t);return/360buyimg\.com\/(?:pcpubliccms|n\d+)\/jfs\//.test(e)&&!/\/(?:s\d+x\d+_|n\d\/s\d+x\d+_)/.test(e)&&!/\/(?:imgzone|sku|shaidan|popWaterMark|babel|jdcms|cms|ddimg|vc)\//.test(e)}function S(t,e={}){if(!t)return[];const r=[],o='#spec-list, [class*="spec-list"], [class*="recommend"], [id*="recommend"], [class*="shaidan"], [id*="shaidan"], [class*="review"], [id*="review"], [class*="comment"], [id*="comment"], [class*="thumb"], [id*="thumb"], [class*="related"], [id*="related"]',n=Boolean(e.ignoreContexts),c=(i)=>{if(!n)return!1;try{return!!i?.closest?.(o)}catch{return!1}},s=(i)=>{for(const l of String(i||"").matchAll(/url\(["']?([^"')]+360buyimg\.com[^"')]+)["']?\)/g))a(l[1])},a=(i)=>{const l=g(i);if(l&&l.includes("360buyimg.com"))r.push(l)};for(const i of t.querySelectorAll?.("img")||[]){if(c(i))continue;a(i.currentSrc||i.src);a(i.getAttribute("data-src"));a(i.getAttribute("data-lazy-img"));a(i.getAttribute("data-lazyload"));a(i.getAttribute("data-original"))}for(const i of t.querySelectorAll?.("source")||[]){if(c(i))continue;a(i.getAttribute("src"));a(i.getAttribute("srcset")?.split(/\s+/)[0]);a(i.getAttribute("data-src"));a(i.getAttribute("data-srcset")?.split(/\s+/)[0])}for(const i of t.querySelectorAll?.('[style*="360buyimg.com"]')||[]){if(c(i))continue;const l=i.getAttribute("style")||"";s(l)}if(typeof getComputedStyle==="function"){const i=[t,...Array.from(t.querySelectorAll?.("*")||[])];for(const l of i){if(c(l))continue;try{const d=getComputedStyle(l);s(d?.backgroundImage);s(d?.background)}catch{}}}return[...new Set(r)]}function u(t){const e=[],r=(o)=>{const n=g(o);if(n&&n.includes("360buyimg.com"))e.push(n)};for(const o of String(t||"").matchAll(/(?:https?:)?\/\/[^"'`\s<>)\\]+360buyimg\.com[^"'`\s<>)\\]*/g))r(o[0]);for(const o of String(t||"").matchAll(/url\(["']?([^"')]+360buyimg\.com[^"')]+)["']?\)/g))r(o[1]);return e}function x(){const t=[];for(const e of document.scripts||[]){const r=e.textContent||"";if(!/360buyimg\.com/.test(r))continue;t.push(...u(r))}for(const e of document.querySelectorAll("iframe"))try{const r=e.contentDocument||e.contentWindow?.document;if(!r)continue;t.push(...S(r.body||r.documentElement||r));for(const o of r.scripts||[]){const n=o.textContent||"";if(!/360buyimg\.com/.test(n))continue;t.push(...u(n))}}catch{}return[...new Set(t)]}function f(t,e=new Set,r=0){if(t==null||r>4)return[];const o=[],n=(c)=>{const s=g(c);if(s&&s.includes("360buyimg.com"))o.push(s)};if(typeof t==="string"){o.push(...u(t));return[...new Set(o)]}if(typeof t!=="object")return[];if(e.has(t))return[];e.add(t);if(Array.isArray(t)){for(const c of t)o.push(...f(c,e,r+1));return[...new Set(o)]}for(const c of Object.values(t)){if(typeof c==="string"){n(c);o.push(...u(c));continue}o.push(...f(c,e,r+1))}return[...new Set(o)]}function b(){const t=[],e=["__NEXT_DATA__","__NUXT__","__INITIAL_STATE__","__INITIAL_DATA__","__APOLLO_STATE__","__INITIAL_PROPS__","__REDUX_STATE__","__PAGE_DATA__","pageData","__data__","detailData"];for(const r of e)try{if(typeof globalThis<"u"&&r in globalThis)t.push(...f(globalThis[r]))}catch{}return[...new Set(t)]}async function _(){const t=[],e=typeof performance<"u"&&typeof performance.getEntriesByType==="function"?performance.getEntriesByType("resource"):[],r=[...new Set(e.map((o)=>o?.name).filter((o)=>typeof o==="string"&&/(?:jd\.com|360buyimg\.com)/.test(o)&&/(?:detail|desc|ware|item|product|sku)/i.test(o)&&!/pc_item_getWareGraphic/i.test(o)))].slice(0,12);for(const o of r)try{const n=await fetch(o,{credentials:"include"});if(!n.ok)continue;const c=await n.text(),s=n.headers.get("content-type")||"";if(/json/i.test(s)||/^\s*[\[{]/.test(c))try{t.push(...f(JSON.parse(c)));continue}catch{}t.push(...u(c))}catch{}return[...new Set(t)]}function k(t){let e="";try{const r=JSON.parse(String(t||""));e=r?.data?.graphicContent||r?.graphicContent||""}catch{e=String(t||"")}return[...new Set(u(e))]}async function J(t){const e=[],r=typeof performance<"u"&&typeof performance.getEntriesByType==="function"?performance.getEntriesByType("resource"):[],o=[...new Set(r.map((n)=>n?.name).filter((n)=>typeof n==="string"&&/pc_item_getWareGraphic/i.test(n)))];if(t){const n=encodeURIComponent(JSON.stringify({skuId:String(t)}));o.unshift(`https://api.m.jd.com/client.action?appid=item-v3&functionId=pc_item_getWareGraphic&client=pc&clientVersion=1.0.0&body=${n}`)}for(const n of o)try{const c=await fetch(n,{credentials:"include"});if(!c.ok)continue;e.push(...k(await c.text()))}catch{}return[...new Set(e)]}async function P(){return[...b(),...await _()]}function h(t){const e=m(t);return/360buyimg\.com\/(?:imgzone|skuimg|babel|jdcms|cms|popWaterMark|vc|ddimg)\//.test(e)&&!/\/shaidan\//.test(e)&&!/\/(?:s\d+x\d+_|n\d\/s\d+x\d+_|sku)\//.test(e)}function D(t){const e=g(t);if(/\/(?:s\d+x\d+_|n\d\/s\d+x\d+_|sku\/s\d+x\d+_)jfs\//.test(e))return!1;const r=m(t);return/360buyimg\.com\/sku\/jfs\//.test(r)&&!/\/shaidan\//.test(r)}function A(t){const e=m(t);if(/\.jpe?g(?:\.avif)?(?:$|[?#])/.test(e))return 0;if(/\.(?:png|webp)(?:\.avif)?(?:$|[?#])/.test(e))return 1;if(/\.gif(?:$|[?#])/.test(e))return 3;if(/\.avif(?:$|[?#])/.test(e))return 2;return 4}function p(t,e={}){const r=Boolean(e.allowWareGraphicSku);return[...new Set(t)].filter((o)=>h(o)||r&&D(o)).map((o,n)=>({url:o,index:n,rank:A(o)})).sort((o,n)=>o.rank-n.rank||o.index-n.index).map((o)=>o.url)}function y(t){const e=document.querySelector("#SPXQ-title")?.parentElement,c=[...[e&&e!==document.body&&e!==document.documentElement?e:null,...["#J-detail","#J-detail-content","#detail",".detail",".detail-content",".detail-content-wrap",".ssd-module-wrap","#SPXQ-title + *"].flatMap((s)=>Array.from(document.querySelectorAll(s)))].filter((s)=>s&&s!==document.body&&s!==document.documentElement).flatMap((s)=>S(s,{ignoreContexts:!0})),...x()];return p(c).slice(0,t)}async function T(t,e){const r=y(t),o=await P(),n=await J(e),c=p([...r,...o]),s=p(n,{allowWareGraphicSku:!0});return p([...c,...s],{allowWareGraphicSku:!0}).slice(0,t)}function z(t){const e=document.scrollingElement||document.documentElement||document.body,r=window.scrollY||window.pageYOffset||e?.scrollTop||0,o=window.innerHeight||document.documentElement?.clientHeight||0,n=Math.max(e?.scrollHeight||0,document.documentElement?.scrollHeight||0,document.body?.scrollHeight||0);return{detailImageCount:y(t).length,scrollY:r,viewportHeight:o,scrollHeight:n,nearBottom:r+o>=n-120}}function W(){const t=Math.max(900,Math.floor((window.innerHeight||900)*0.9));window.scrollBy(0,t);return t}async function M(){const t=document.querySelector("#SPXQ-tab-column"),e=document.querySelector("#SPXQ-title");if(t)t.click();e?.scrollIntoView({block:"start"});const r=Math.max(900,Math.floor((window.innerHeight||900)*0.9));for(let o=0;o<2;o++){window.scrollBy(0,r);await new Promise((n)=>setTimeout(n,250))}}function O(t){const r=[document.querySelector("._gallery_116km_1"),...Array.from(document.querySelectorAll('[class*="_gallery_"]')),document.querySelector(".preview-wrap"),document.querySelector("#spec-img")?.parentElement].filter(Boolean).flatMap((o)=>S(o).map(m));return[...new Set(r)].filter(F).slice(0,t)}function X(t,e){return[...new Set(t.map(m).filter(Boolean))].filter((o)=>o.includes(".avif")&&h(o)).slice(0,e)}function q(t){const r=(Array.isArray(t)?t:[]).find((o)=>o&&typeof o==="object");for(const o of["p","op","m"]){const n=r?.[o];if(n&&n!=="-1.00")return String(n)}return""}function I(t){const e=String(t||"").replace(/\s+/g,"").match(/(?:¥|¥)?(\d{2,7}(?:\.\d{1,2})?)/);return e?e[1]:""}function G(t){const e=[`.J-p-${t}`,'[class*="price"] [class*="num"]','[class*="price"]',".p-price strong",".price.jd-price"];for(const r of e)for(const o of document.querySelectorAll(r)){const n=I(o.textContent||"");if(n)return n}for(const r of document.querySelectorAll("span, strong, div")){const o=(r.textContent||"").trim();if(!/预售价|到手价|秒杀价|京东价|¥|¥/.test(o))continue;const n=I(o);if(n)return n;const c=I(r.parentElement?.textContent||"");if(c)return c}return""}async function V(t){const e=new AbortController,r=setTimeout(()=>e.abort(),3000);try{const o=await fetch(`https://p.3.cn/prices/mgets?skuIds=J_${encodeURIComponent(t)}&type=1`,{credentials:"include",signal:e.signal});if(!o.ok)return"";return q(await o.json())}catch{return""}finally{clearTimeout(r)}}function C(t){const e={},r=String(t||"").split(`
|
|
2
|
+
`).map((c)=>c.trim()).filter(Boolean),o=new Set(["品牌","商品名称","商品编号","商品毛重","商品产地","货号","类型","能效等级","洗涤容量","烘干容量","排水方式","颜色","型号","系列","系列品","款式","版本","规格","容量"]),n=(c,s)=>{const a=String(c||"").trim().replace(/[::]+$/,""),i=String(s||"").trim();if(!o.has(a))return;if(!i||i.length>120)return;if(/^(服务|支付定金|加入购物车|立即购买|首页|购物车|我的|客服|品牌闪购|以旧换新)$/.test(i))return;if(!e[a])e[a]=i};for(const c of r){const s=c.match(/^([^::]{1,12})[::]\s*(.{1,120})$/);if(s){n(s[1],s[2]);continue}}for(let c=0;c<r.length-1;c++){const s=r[c].replace(/[::]+$/,""),a=r[c+1];if(o.has(s)&&!o.has(a))n(s,a)}return e}function B(){const t={},e=(n,c)=>{const s=String(n||"").trim().replace(/[::]+$/,""),a=String(c||"").replace(/\s+/g," ").trim();if(!s||!a)return;t[s]=a},r=(n)=>{const c=n.querySelector('.specification-item-sku--selected, .specification-series-item--selected, .selected, [class*="selected"]');if(!c)return"";return c.querySelector('[class*="text"]')?.textContent?.trim()||c.textContent?.trim()||c.querySelector("img")?.getAttribute("alt")?.trim()||""};for(const n of document.querySelectorAll(".specification-series-layout")){const c=n.querySelector(".layout-label")?.textContent?.trim();e(c,r(n))}for(const n of document.querySelectorAll(".specification-group")){const c=n.querySelector(".specification-label, .specification-group-label, .label")?.textContent?.trim();e(c,r(n))}const o=document.querySelector("#SPXQ-title")?.parentElement?.querySelector(".attrs")||document.querySelector("#parameter2")||document.querySelector(".Ptable");if(o)Object.assign(t,C(o.innerText||o.textContent||""));return t}function U(t){const e=location.href,r=document.title||"",o=document.body?.innerText||document.body?.textContent||"",n=Boolean(document.querySelector('.product-title, .sku-title, #spec-list, #J-detail, #SPXQ-title, [class*="_gallery_"]')),c=`${r}
|
|
3
|
+
${o}`,s=/passport\.jd\.com|\/login\.aspx/.test(e)||/京东-欢迎登录|京东登录/.test(r),a=/risk_handler|安全验证|安全校验|完成安全验证|滑块|captcha|访问过于频繁|验证中心|京东验证/.test(`${e}
|
|
4
|
+
${c}`),i=/请登录|登录/.test(c)&&!n,l=s||a||i,d=new RegExp(`item.jd.com/${t}.html`).test(e);return{href:e,title:r,isProductPage:n&&d&&!l,hasProductMarker:n,onExpectedItemUrl:d,looksBlocked:l,isLoginPage:s,hasSecurityChallenge:a}}N({site:"jd",name:"item",access:"read",description:"京东商品详情(价格、店铺、规格参数、主图、详情图)",domain:"item.jd.com",strategy:R.COOKIE,args:[{name:"sku",required:!0,positional:!0,help:"商品 SKU ID(如 100291143898)"},{name:"images",type:"int",default:200,help:"图片数量上限(默认200)"}],columns:["title","price","shop","specs","mainImages","detailImages"],func:async(t,e)=>{const r=v(e.sku),o=E(e.images,200),n=`https://item.jd.com/${r}.html`;if(!(await t.evaluate("location.href").catch(()=>"")).includes(`item.jd.com/${r}.html`)){await t.goto(n,{waitUntil:"load"});await t.wait(2)}if(!(await t.evaluate(`(() => {
|
|
5
|
+
const detectJdPageState = ${U.toString()};
|
|
6
|
+
return detectJdPageState(${JSON.stringify(r)});
|
|
7
|
+
})()`).catch(()=>null))?.looksBlocked){await t.evaluate(`
|
|
8
8
|
(async () => {
|
|
9
|
-
const scrollJdDetailIntoView = ${
|
|
9
|
+
const scrollJdDetailIntoView = ${M.toString()};
|
|
10
10
|
return scrollJdDetailIntoView();
|
|
11
11
|
})()
|
|
12
|
-
`);await
|
|
13
|
-
const normalizeJdImageUrl = ${
|
|
14
|
-
const normalizeJdImageSize = ${
|
|
15
|
-
const collectImageUrlsFrom = ${
|
|
16
|
-
const collectImageUrlsFromText = ${
|
|
17
|
-
const collectImageUrlsFromFramesAndScripts = ${
|
|
18
|
-
const collectImageUrlsFromPayload = ${
|
|
19
|
-
const collectImageUrlsFromPageDataObjects = ${
|
|
20
|
-
const collectImageUrlsFromNetworkResources = ${
|
|
21
|
-
const collectImageUrlsFromWareGraphicText = ${
|
|
22
|
-
const collectImageUrlsFromWareGraphicResources = ${
|
|
23
|
-
const collectImageUrlsFromFallbackSources = ${
|
|
24
|
-
const isJdDetailImage = ${
|
|
25
|
-
const isJdWareGraphicDetailImage = ${
|
|
26
|
-
const rankJdDetailImage = ${
|
|
27
|
-
const orderJdDetailImages = ${
|
|
28
|
-
const extractDetailImagesFromDom = ${
|
|
29
|
-
const extractDetailImagesFromPage = ${
|
|
30
|
-
const getJdDetailScrollSnapshot = ${
|
|
31
|
-
const scrollJdDetailIntoView = ${
|
|
12
|
+
`);await t.wait(1.5);let i=-1,l=0;for(let d=0;d<30;d++){const w=await t.evaluate(`(() => {
|
|
13
|
+
const normalizeJdImageUrl = ${g.toString()};
|
|
14
|
+
const normalizeJdImageSize = ${m.toString()};
|
|
15
|
+
const collectImageUrlsFrom = ${S.toString()};
|
|
16
|
+
const collectImageUrlsFromText = ${u.toString()};
|
|
17
|
+
const collectImageUrlsFromFramesAndScripts = ${x.toString()};
|
|
18
|
+
const collectImageUrlsFromPayload = ${f.toString()};
|
|
19
|
+
const collectImageUrlsFromPageDataObjects = ${b.toString()};
|
|
20
|
+
const collectImageUrlsFromNetworkResources = ${_.toString()};
|
|
21
|
+
const collectImageUrlsFromWareGraphicText = ${k.toString()};
|
|
22
|
+
const collectImageUrlsFromWareGraphicResources = ${J.toString()};
|
|
23
|
+
const collectImageUrlsFromFallbackSources = ${P.toString()};
|
|
24
|
+
const isJdDetailImage = ${h.toString()};
|
|
25
|
+
const isJdWareGraphicDetailImage = ${D.toString()};
|
|
26
|
+
const rankJdDetailImage = ${A.toString()};
|
|
27
|
+
const orderJdDetailImages = ${p.toString()};
|
|
28
|
+
const extractDetailImagesFromDom = ${y.toString()};
|
|
29
|
+
const extractDetailImagesFromPage = ${T.toString()};
|
|
30
|
+
const getJdDetailScrollSnapshot = ${z.toString()};
|
|
31
|
+
const scrollJdDetailIntoView = ${M.toString()};
|
|
32
32
|
if (document.querySelector('#SPXQ-title') && window.scrollY < 1000) {
|
|
33
|
-
return scrollJdDetailIntoView().then(() => getJdDetailScrollSnapshot(${
|
|
33
|
+
return scrollJdDetailIntoView().then(() => getJdDetailScrollSnapshot(${o}));
|
|
34
34
|
}
|
|
35
|
-
return getJdDetailScrollSnapshot(${
|
|
36
|
-
})()`).catch(()=>null);if(!
|
|
37
|
-
const scrollJdDetailStep = ${
|
|
35
|
+
return getJdDetailScrollSnapshot(${o});
|
|
36
|
+
})()`).catch(()=>null);if(!w)break;l=w.detailImageCount===i?l+1:0;i=w.detailImageCount;if(w.nearBottom&&l>=2)break;await t.evaluate(`(() => {
|
|
37
|
+
const scrollJdDetailStep = ${W.toString()};
|
|
38
38
|
return scrollJdDetailStep();
|
|
39
|
-
})()`);await
|
|
39
|
+
})()`);await t.wait(0.8)}}const a=await t.evaluate(`
|
|
40
40
|
(async () => {
|
|
41
|
-
const maxImg = ${
|
|
42
|
-
const normalizeJdImageUrl = ${
|
|
43
|
-
const normalizeJdImageSize = ${
|
|
44
|
-
const isJdMainImage = ${
|
|
45
|
-
const collectImageUrlsFrom = ${
|
|
46
|
-
const collectImageUrlsFromText = ${
|
|
47
|
-
const collectImageUrlsFromFramesAndScripts = ${
|
|
48
|
-
const collectImageUrlsFromPayload = ${
|
|
49
|
-
const collectImageUrlsFromPageDataObjects = ${
|
|
50
|
-
const collectImageUrlsFromNetworkResources = ${
|
|
51
|
-
const collectImageUrlsFromWareGraphicText = ${
|
|
52
|
-
const collectImageUrlsFromWareGraphicResources = ${
|
|
53
|
-
const collectImageUrlsFromFallbackSources = ${
|
|
54
|
-
const isJdDetailImage = ${
|
|
55
|
-
const isJdWareGraphicDetailImage = ${
|
|
56
|
-
const rankJdDetailImage = ${
|
|
57
|
-
const orderJdDetailImages = ${
|
|
58
|
-
const extractMainImages = ${
|
|
59
|
-
const extractDetailImagesFromDom = ${
|
|
60
|
-
const extractDetailImagesFromPage = ${
|
|
61
|
-
const extractPriceFromPayload = ${
|
|
62
|
-
const fetchJdPrice = ${
|
|
63
|
-
const extractSpecsFromText = ${
|
|
64
|
-
const extractSpecs = ${
|
|
65
|
-
const detectJdPageState = ${
|
|
66
|
-
const pageState = detectJdPageState(${JSON.stringify(
|
|
67
|
-
const normalizePriceText = ${
|
|
68
|
-
const extractPriceFromDom = ${
|
|
69
|
-
const apiPrice = await fetchJdPrice(${JSON.stringify(
|
|
70
|
-
const domPrice = extractPriceFromDom(${JSON.stringify(
|
|
41
|
+
const maxImg = ${o};
|
|
42
|
+
const normalizeJdImageUrl = ${g.toString()};
|
|
43
|
+
const normalizeJdImageSize = ${m.toString()};
|
|
44
|
+
const isJdMainImage = ${F.toString()};
|
|
45
|
+
const collectImageUrlsFrom = ${S.toString()};
|
|
46
|
+
const collectImageUrlsFromText = ${u.toString()};
|
|
47
|
+
const collectImageUrlsFromFramesAndScripts = ${x.toString()};
|
|
48
|
+
const collectImageUrlsFromPayload = ${f.toString()};
|
|
49
|
+
const collectImageUrlsFromPageDataObjects = ${b.toString()};
|
|
50
|
+
const collectImageUrlsFromNetworkResources = ${_.toString()};
|
|
51
|
+
const collectImageUrlsFromWareGraphicText = ${k.toString()};
|
|
52
|
+
const collectImageUrlsFromWareGraphicResources = ${J.toString()};
|
|
53
|
+
const collectImageUrlsFromFallbackSources = ${P.toString()};
|
|
54
|
+
const isJdDetailImage = ${h.toString()};
|
|
55
|
+
const isJdWareGraphicDetailImage = ${D.toString()};
|
|
56
|
+
const rankJdDetailImage = ${A.toString()};
|
|
57
|
+
const orderJdDetailImages = ${p.toString()};
|
|
58
|
+
const extractMainImages = ${O.toString()};
|
|
59
|
+
const extractDetailImagesFromDom = ${y.toString()};
|
|
60
|
+
const extractDetailImagesFromPage = ${T.toString()};
|
|
61
|
+
const extractPriceFromPayload = ${q.toString()};
|
|
62
|
+
const fetchJdPrice = ${V.toString()};
|
|
63
|
+
const extractSpecsFromText = ${C.toString()};
|
|
64
|
+
const extractSpecs = ${B.toString()};
|
|
65
|
+
const detectJdPageState = ${U.toString()};
|
|
66
|
+
const pageState = detectJdPageState(${JSON.stringify(r)});
|
|
67
|
+
const normalizePriceText = ${I.toString()};
|
|
68
|
+
const extractPriceFromDom = ${G.toString()};
|
|
69
|
+
const apiPrice = await fetchJdPrice(${JSON.stringify(r)});
|
|
70
|
+
const domPrice = extractPriceFromDom(${JSON.stringify(r)});
|
|
71
71
|
const price = apiPrice || domPrice || 'not found';
|
|
72
72
|
|
|
73
73
|
const title = document.querySelector('.product-title')?.textContent?.trim() ||
|
|
@@ -83,7 +83,7 @@ ${Q}`),Z=/请登录|登录/.test(Q)&&!N,$=X||_||Z,E=new RegExp(`item.jd.com/${j}
|
|
|
83
83
|
const srcs = allImgs.map(img => img.src).filter(Boolean);
|
|
84
84
|
|
|
85
85
|
const mainImages = extractMainImages(maxImg);
|
|
86
|
-
const detailImages = await extractDetailImagesFromPage(maxImg, ${JSON.stringify(
|
|
86
|
+
const detailImages = await extractDetailImagesFromPage(maxImg, ${JSON.stringify(r)});
|
|
87
87
|
const specs = extractSpecs();
|
|
88
88
|
|
|
89
89
|
const result = { title, price, shop, specs, mainImages, detailImages, totalImages: new Set(srcs).size, pageState };
|
|
@@ -95,4 +95,4 @@ ${Q}`),Z=/请登录|登录/.test(Q)&&!N,$=X||_||Z,E=new RegExp(`item.jd.com/${j}
|
|
|
95
95
|
}
|
|
96
96
|
return result;
|
|
97
97
|
})()
|
|
98
|
-
`);if(
|
|
98
|
+
`);if(a?.error){if(a?.pageState?.looksBlocked)throw new H("item.jd.com",a.error);throw new j(a.error)}if(o>0&&a?.pageState?.isProductPage&&(!Array.isArray(a.detailImages)||a.detailImages.length===0))throw new j("JD item detail images were not found","The product page loaded, but no detail images were detected from DOM, scripts, frames, page data, or WareGraphic fallback.");return[a]}});export const __test__={normalizePositiveInt:E,normalizeJdSkuInput:v,normalizeJdImageUrl:g,normalizeJdImageSize:m,isJdMainImage:F,collectImageUrlsFrom:S,collectImageUrlsFromText:u,collectImageUrlsFromFramesAndScripts:x,collectImageUrlsFromPayload:f,collectImageUrlsFromPageDataObjects:b,collectImageUrlsFromNetworkResources:_,collectImageUrlsFromWareGraphicText:k,collectImageUrlsFromWareGraphicResources:J,collectImageUrlsFromFallbackSources:P,isJdDetailImage:h,isJdWareGraphicDetailImage:D,rankJdDetailImage:A,orderJdDetailImages:p,getJdDetailScrollSnapshot:z,scrollJdDetailStep:W,extractMainImages:O,extractDetailImagesFromDom:y,extractDetailImagesFromPage:T,extractAvifImages:X,extractPriceFromPayload:q,normalizePriceText:I,extractPriceFromDom:G,extractSpecsFromText:C,extractSpecs:B,detectJdPageState:U};
|