juejin-publisher

掘金自动发布 - 一键发布文章到掘金,支持定时发布、标签优化、封面设置。适合:内容创作者、技术博主。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "juejin-publisher" with this command: npx skills add yang1002378395-cmyk/juejin-auto-publisher

掘金自动发布 Skill

一键发布文章到掘金,自动化内容分发。

核心功能

1. 自动登录

  • Cookie 持久化
  • 自动续期
  • 失败提醒

2. 文章发布

  • Markdown 支持
  • 自动生成摘要
  • 标签推荐
  • 封面设置

3. 定时发布

  • 指定发布时间
  • 队列管理
  • 发布确认

使用方法

发布文章

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/

配置文件

~/.openclaw/workspace/JUEJIN.md

# 掘金 Cookie(登录后获取)
cookie: "你的掘金 Cookie"

# 默认标签
default_tags:
  - 后端
  - Python
  - AI

# 发布设置
publish:
  # 是否立即发布
  auto_publish: true

  # 默认封面(留空自动生成)
  cover_image: ""

  # 文章分类
  category: "后端"

# 定时发布队列
queue_dir: "~/.openclaw/workspace/memory/content-queue/"

Cookie 获取方法

方法 1:浏览器开发者工具

  1. 登录掘金 juejin.cn
  2. F12 打开开发者工具
  3. Network → 找到任意请求
  4. Headers → Cookie → 复制完整值

方法 2:使用脚本

python3 ~/.openclaw/workspace/custom/extract_juejin_cookie.py

API 说明

发布接口

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": "摘要"
}

标签 ID 对照

{
  "后端": "6809637773935378440",
  "前端": "6809637771516121096",
  "Python": "6809637771516119047",
  "AI": "6809637771516120071",
  "自动化": "6809637771516121096"
}

错误处理

Cookie 失效

❌ Cookie 失效,请重新登录
→ 执行 python3 extract_juejin_cookie.py

发布失败

❌ 发布失败:[错误信息]
→ 检查网络连接
→ 检查文章格式
→ 重试

最佳实践

发布时间

  • 工作日 9:00-10:00(早高峰)
  • 工作日 12:00-13:00(午休)
  • 工作日 18:00-19:00(下班)
  • 周末 10:00-11:00

标签选择

  • 选择 3-5 个相关标签
  • 优先选择热门标签
  • 不要选择无关标签

标题优化

  • 长度:15-30 字
  • 包含关键词
  • 有吸引力但不夸张

实战经验

✅ 成功案例

  • 发布 15+ 篇文章
  • 100% 发布成功率
  • Cookie 有效期 > 1 年

⚠️ 注意事项

  • 避免短时间大量发布(会被限流)
  • 文章要有真实价值(不要纯广告)
  • 互动能增加曝光(及时回复评论)

完整示例

#!/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+ 篇)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Aliyun Asr

Pure Aliyun ASR skill for voice message transcription, supports multiple channels including Feishu

Registry SourceRecently Updated
2.3K2Profile unavailable
General

飞书文档API技能

飞书文档(Docx)API技能。用于创建、读取、更新和删除飞书文档。支持Markdown/HTML内容转换、文档权限管理。

Registry SourceRecently Updated
3.1K3Profile unavailable
General

Weather Open-Meteo

Get current weather and forecasts using Open-Meteo API (no API key required). Optimized for PowerShell environments with Chinese support.

Registry SourceRecently Updated
3400Profile unavailable
General

DOCX Formatter

生成符合中国公文格式规范的Word文档,支持标题、正文样式、自动格式排版和中文引号配对。

Registry SourceRecently Updated
9671Profile unavailable