Install
openclaw skills install juejin-auto-publisher掘金自动发布 - 一键发布文章到掘金,支持定时发布、标签优化、封面设置。适合:内容创作者、技术博主。
openclaw skills install juejin-auto-publisher一键发布文章到掘金,自动化内容分发。
python3 ~/.openclaw/workspace/custom/juejin_publisher.py \
--title "文章标题" \
--content "文章内容(Markdown)" \
--tags "Python,AI,自动化"
python3 ~/.openclaw/workspace/custom/juejin_publisher.py \
--title "文章标题" \
--file article.md \
--schedule "2026-03-12 09:00"
python3 ~/.openclaw/workspace/custom/juejin_publisher.py \
--queue ~/.openclaw/workspace/memory/content-queue/
# 掘金 Cookie(登录后获取)
cookie: "你的掘金 Cookie"
# 默认标签
default_tags:
- 后端
- Python
- AI
# 发布设置
publish:
# 是否立即发布
auto_publish: true
# 默认封面(留空自动生成)
cover_image: ""
# 文章分类
category: "后端"
# 定时发布队列
queue_dir: "~/.openclaw/workspace/memory/content-queue/"
python3 ~/.openclaw/workspace/custom/extract_juejin_cookie.py
POST https://api.juejin.cn/content_api/v1/article_draft/create
Headers:
Cookie: [你的Cookie]
Body:
{
"title": "文章标题",
"mark_content": "Markdown 内容",
"category_id": "分类ID",
"tag_ids": ["标签ID"],
"brief_content": "摘要"
}
{
"后端": "6809637773935378440",
"前端": "6809637771516121096",
"Python": "6809637771516119047",
"AI": "6809637771516120071",
"自动化": "6809637771516121096"
}
❌ Cookie 失效,请重新登录
→ 执行 python3 extract_juejin_cookie.py
❌ 发布失败:[错误信息]
→ 检查网络连接
→ 检查文章格式
→ 重试
#!/usr/bin/env python3
import requests
def publish_article(title, content, tags):
cookies = load_cookies()
url = "https://api.juejin.cn/content_api/v1/article_draft/create"
data = {
"title": title,
"mark_content": content,
"category_id": "6809637773935378440",
"tag_ids": tags,
"brief_content": content[:100]
}
response = requests.post(url, json=data, cookies=cookies)
return response.json()
# 使用
publish_article(
"用 OpenClaw 自动化赚钱",
"# 前言\n...",
["6809637771516119047", "6809637771516120071"]
)
创建:2026-03-11 版本:1.0 状态:✅ 实战验证(已发布 15+ 篇)