Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseweibo — read & post on 微博 via your own cookies
weibo — 通过自身Cookie读取和发布微博
Drives the user's real 微博 account through the same web API
the site uses, authenticated by the login cookie they captured with the ACE
extension. No browser, no third-party deps — just .
weibo.com/ajaxurllib⚠️ Not yet E2E-verified. Unlike the other cookie skills (csdn / juejin / bilibili / medium), this one was built from the documented web API but could not be tested against a live account (no 微博 connection existed at build time). The first live run is the verification; if an endpoint shape drifted it will surface as a clear error rather than silent breakage.
The connector injects the cookie jar as an env var:
- — a JSON array of cookies. Secret — never echo or print it. Writes send the
WEIBO_COOKIEScookie as both theXSRF-TOKENheader and thex-xsrf-tokenform field (the CLI does this for you).st
通过网站使用的同款 Web API操作用户的真实微博账号,通过用户使用ACE扩展捕获的登录Cookie进行身份验证。无需浏览器,无需第三方依赖——仅使用。
weibo.com/ajaxurllib⚠️ 尚未完成端到端验证。 与其他基于Cookie的技能(csdn / 掘金 / bilibili / medium)不同,本技能基于公开文档的Web API构建,但无法在真实账号上进行测试(构建时无可用的微博连接)。首次实际运行即为验证过程;若接口结构发生变化,会明确抛出错误而非静默失效。
连接器将Cookie Jar作为环境变量注入:
- — Cookie的JSON数组。保密内容——切勿回显或打印。 发布内容时,会将
WEIBO_COOKIESCookie同时作为XSRF-TOKEN请求头和x-xsrf-token表单字段发送(CLI会自动完成此操作)。st
CLI
CLI
The skill ships — self-contained, stdlib only.
scripts/weibo.pysh
WB=$SKILL_DIR/scripts/weibo.py
python3 $WB whoami # who is logged in (+ counts)
python3 $WB posts --limit 20 # my recent 微博 + engagementEngagement comes straight from 微博: (转发),
(评论), (赞).
reposts_countcomments_countattitudes_count本技能附带——独立脚本,仅依赖标准库。
scripts/weibo.pysh
WB=$SKILL_DIR/scripts/weibo.py
python3 $WB whoami # 查询当前登录用户(及相关统计数据)
python3 $WB posts --limit 20 # 查看我的近期微博及互动数据互动数据直接来自微博:(转发)、(评论)、(赞)。
reposts_countcomments_countattitudes_countVerify the connection first
先验证连接
sh
python3 $WB whoamish
python3 $WB whoami→ {"uid": "...", "name": "...", "statuses_count": ...}
→ {"uid": "...", "name": "...", "statuses_count": ...}
On an auth error the cookie is expired — have the user reconnect at
<https://auth.acedata.cloud/user/connections>. Do **not** loop-retry.
若出现身份验证错误,说明Cookie已过期——请用户前往<https://auth.acedata.cloud/user/connections>重新连接。**请勿循环重试**。Posting — GATED (dry-run unless trailing --confirm
)
--confirm发布微博 — 受保护(仅在末尾添加--confirm
时才会实际发布,否则为试运行)
--confirm微博 are short-form, so there is no draft step — a confirmed post goes live.
Without a trailing it dry-runs. is honored only as the
last argument. Always show the dry-run, get an explicit "yes", then re-run.
--confirm--confirmsh
python3 $WB post --content "你好,这是一条微博" # dry-run
python3 $WB post --content "你好,这是一条微博" --confirm # PUBLIC 微博 (immediate)- There is no draft and no private mode on 微博 — a confirmed post is
immediately public. Always show the dry-run and get explicit approval of
the exact text before adding .
--confirm
微博属于短内容形式,因此无草稿步骤——确认发布后内容立即上线。若未在末尾添加,则为试运行。仅在作为最后一个参数时生效。请始终先展示试运行结果,获得用户明确的“同意”后,再重新运行命令。
--confirm--confirmsh
python3 $WB post --content "你好,这是一条微博" # 试运行
python3 $WB post --content "你好,这是一条微博" --confirm # 发布公开微博(立即生效)- 微博无草稿模式和私密模式——确认发布的内容会立即变为公开状态。在添加前,请始终展示试运行结果,并获得用户对确切文本的明确批准。
--confirm
Gotchas
注意事项
- This is the user's real 微博 account. Confirm before any post — it is immediate and public by default.
- Not E2E-verified (see the warning above) — expect to validate the first run.
- Never print — it is full account access.
WEIBO_COOKIES - ToS: acts only on the user's own account with their own captured cookie.
- 操作的是用户的真实微博账号。发布任何内容前请确认——默认情况下内容会立即公开。
- 尚未完成端到端验证(见上方警告)——首次运行时需进行验证。
- 切勿打印——它拥有账号的完全访问权限。
WEIBO_COOKIES - 服务条款(ToS):仅在用户自身账号上操作,且使用用户自行捕获的Cookie。