← 返回
未分类 中文

Weibo Publish

Publish text and image posts to Weibo (m.weibo.cn) using browser automation. Use when the user needs to post content to Weibo programmatically, including tex...
使用浏览器自动化向微博(m.weibo.cn)发布文字和图片帖子;当需要通过程序向微博发布内容(包括文字)时使用。
noah-1106 noah-1106 来源
未分类 clawhub v1.0.0 1 版本 99907.3 Key: 无需
★ 2
Stars
📥 1,038
下载
💾 16
安装
1
版本
#latest

概述

Weibo Publisher

Publish content to Weibo through browser automation on m.weibo.cn (mobile web version).

Prerequisites

  • Browser must be running with valid Weibo login session
  • Images must be placed in /tmp/openclaw/uploads/ before upload
  • Requires manual verification after posting (compose page doesn't auto-redirect)

Publishing Workflow

1. Open Compose Page

browser open https://m.weibo.cn/compose

2. Input Text Content

Get snapshot to find textbox ref, then type content:

// Example: Post text
browser act kind=type ref=<textbox-ref> text="Your post content here"

3. Upload Images (Optional)

Important: Images must be in /tmp/openclaw/uploads/ directory.

# Prepare image (example)
cp /path/to/image.png /tmp/openclaw/uploads/

Upload using the upload button ref (not the hidden file input):

// Upload image - use the upload button ref
browser upload inputRef=<upload-button-ref> paths=["/tmp/openclaw/uploads/image.png"]

// Wait 2-3 seconds for upload to complete
// Take screenshot to verify preview appears

Verification: Wait 2-3 seconds, then screenshot to confirm image preview is visible on page.

4. Publish Post

Click the send button:

browser act kind=click ref=<send-button-ref>

5. Verify Publication (Critical)

Do NOT rely on page redirect - compose page stays open.

Verification steps:

  1. Wait 5 seconds for backend processing
  2. Navigate to personal page:

```

browser open https://m.weibo.cn

browser act kind=click ref= // Top-left avatar

```

  1. Check latest post matches what was just published
  2. Close compose page to prevent accidental repost:

```

browser action=close targetId=

```

6. Cleanup (Required)

After successful publication, clean up temporary files:

# Remove uploaded image from temp directory
rm /tmp/openclaw/uploads/<filename>

# Optional: Clean up browser screenshots older than 7 days
find ~/.openclaw/media/browser/ -type f -mtime +7 -delete

Note: Temporary files are NOT automatically cleaned up. Cleanup is required - always run it after publishing.

Page Element References

Common refs on m.weibo.cn/compose:

  • Text input: ref=e15 (textbox "分享新鲜事…")
  • Send button: ref=e10 ("发送")
  • Image upload button: ref=e25 or ref=e29 ( icon)

Note: Refs are dynamic - always get fresh snapshot before interacting.

Error Handling

IssueSolution
-----------------
Image upload shows "图片选择失败"File not in /tmp/openclaw/uploads/. Move file to correct location.
Send button not respondingCheck if textbox is empty. Weibo requires at least text or image.
Post not appearing after 5sWait longer (network delay) or check login status.

Anti-Duplication Measures

  • Always verify post exists on personal page before considering task complete
  • Always close compose tab after successful verification
  • If uncertain whether post succeeded, check personal page before retrying

References

See references/workflow-examples.md for complete code examples.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 22:26 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Marketing Skills

jchopard69
{"answer":"获取23个营销模块,包含CRO、SEO、文案、分析、发布、广告及社媒的清单、框架与现成交付物。"}
★ 143 📥 30,756
content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 903 📥 205,938
content-creation

humanizer-zh

liuxy951129-cpu
去除文本中的 AI 生成痕迹。适用于编辑或审阅文本,使其听起来更自然、更像人类书写。 基于维基百科的"AI 写作特征"综合指南。检测并修复以下模式:夸大的象征意义、 宣传性语言、以 -ing 结尾的肤浅分析、模糊的归因、破折号过度使用、三段
★ 60 📥 29,157