What this skill does
Creates a short briefing from Daum 메인 실시간 트렌드(REALTIMETRENDTOP):
(ClawHub 검증 정책상 바이너리 파일(jpg/png 등)을 스킬에 포함할 수 없어서, 스크린샷은 외부 링크로만 첨부하세요.)
예시 스크린샷(외부 링크): https://github.com/user-attachments/assets/9aefc56b-6f52-4580-b4e5-585bd0e816da
- - TOP10 keywords
- For each keyword: fetch Daum search page and extract one representative title (usually the first News result)
- Include links
- Print exactly 12 lines to stdout:
1) Title line
2–11) 10 trend lines
12) INLINECODE0
Data sources
- - Daum homepage: https://www.daum.net/
- Daum search (for each keyword): INLINECODE1
How to fetch & parse https://www.daum.net/ (REALTIMETRENDTOP)
Daum renders a large JSON blob inside the HTML. The real-time trend slot appears as a node with:
- - INLINECODE2
- INLINECODE3
- INLINECODE4 (array of
{ keyword, rank, ... })
Parsing approach (used in the script):
- 1. Download the HTML.
- Find the first occurrence of
"uiType":"REALTIME_TREND_TOP". - From that position, locate:
-
"updatedAt":"..."
-
"keywords":[ ... ]
- 4. Extract the
keywords array substring by bracket matching, then JSON.parse it.
This avoids having to parse the full page-level JSON assignment.
How to fetch each keyword’s Daum search page & extract 1 title
For each keyword, request:
INLINECODE11
Extraction heuristic (used in the script):
- - Prefer the first match of the News-like title pattern:
-
<strong class="tit-g ..."><a href="...">TITLE</a>
- - Strip HTML tags (
<b>...</b> etc.) and decode basic HTML entities. - If no title is found, fall back to
Daum 검색 결과.
Output format
Example (12 lines):
- 1. INLINECODE15
- INLINECODE16
...
- 11. INLINECODE17
- INLINECODE18
Script
- - Entry point: INLINECODE19
- Runs with Node.js built-ins only.
Run locally
CODEBLOCK0
Sanity check (should print 12 lines)
CODEBLOCK1
OpenClaw cron job (08:00–21:00 every hour, KST) + Telegram announce
OpenClaw cron jobs live in:
In this OpenClaw setup, cron jobs typically run an agent turn. The agent can execute the Node script and then announce the stdout to Telegram.
Create a cron job with the CLI (recommended):
CODEBLOCK2
Tip: replace {workspace} with your OpenClaw workspace path (often ~/.openclaw/workspace or your configured workspace).
该技能的功能
根据 Daum 主页实时趋势(REALTIMETRENDTOP) 生成简短简报:
(根据 ClawHub 验证政策,二进制文件(如 jpg/png 等)无法包含在技能中,因此请仅通过外部链接附上截图。)
示例截图(外部链接):https://github.com/user-attachments/assets/9aefc56b-6f52-4580-b4e5-585bd0e816da
- - TOP10 关键词
- 针对每个关键词:抓取 Daum 搜索页面并提取 一个代表性标题(通常为第一个新闻结果)
- 包含链接
- 向标准输出打印恰好 12 行:
1) 标题行
2–11) 10 个趋势行
12) updatedAt: ...
数据来源
- - Daum 主页:https://www.daum.net/
- Daum 搜索(针对每个关键词):https://search.daum.net/search?w=tot&DA=RT1&rtmaxcoll=AIO,NNS,DNS&q=<关键词>
如何抓取并解析 https://www.daum.net/ (REALTIMETRENDTOP)
Daum 在 HTML 中渲染了一个大型 JSON 数据块。实时趋势槽位以如下节点形式出现:
- - uiType:REALTIMETRENDTOP
- contents.data.updatedAt
- contents.data.keywords({ keyword, rank, ... } 数组)
解析方法(脚本中使用):
- 1. 下载 HTML。
- 查找 uiType:REALTIMETRENDTOP 首次出现的位置。
- 从该位置开始,定位:
- updatedAt:...
- keywords:[ ... ]
- 4. 通过括号匹配提取 keywords 数组子字符串,然后使用 JSON.parse 解析。
这样可以避免解析完整的页面级 JSON 赋值。
如何抓取每个关键词的 Daum 搜索页面并提取 1 个标题
针对每个关键词,请求:
https://search.daum.net/search?w=tot&DA=RT1&rtmaxcoll=AIO,NNS,DNS&q=
提取启发式方法(脚本中使用):
-
标题
- - 去除 HTML 标签(... 等)并解码基本 HTML 实体。
- 如果未找到标题,则回退为 Daum 검색 결과。
输出格式
示例(12 行):
- 1. Daum 실시간 트렌드 TOP10
- 1. 关键词: 代表性标题 https://search.daum.net/search?...q=...
...
- 11. 10. 关键词: 代表性标题 https://search.daum.net/search?...q=...
- updatedAt: 2026-03-05T06:08:51.024+09:00
脚本
- - 入口点:scripts/briefing.mjs
- 仅使用 Node.js 内置模块运行。
本地运行
bash
node {workspace}/skills/daum-trends-briefing/scripts/briefing.mjs
完整性检查(应打印 12 行)
bash
node {workspace}/skills/daum-trends-briefing/scripts/briefing.mjs | wc -l | tr -d
预期结果:12
OpenClaw 定时任务(每天 08:00–21:00 每小时执行,KST)+ Telegram 通知
OpenClaw 定时任务存放位置:
- - ~/.openclaw/cron/jobs.json
在此 OpenClaw 设置中,定时任务通常执行一个 代理轮次。代理可以执行 Node 脚本,然后将标准输出通知到 Telegram。
使用 CLI 创建定时任务(推荐):
bash
openclaw cron add \
--name Daum 实时趋势简报(每小时整点 KST) \
--cron 0 8-21 * \
--tz Asia/Seoul \
--agent main \
--announce --channel telegram --to <你的Telegram聊天ID> \
--expect-final \
--message $运行以下命令并按原样通知其标准输出:\n\nnode {workspace}/skills/daum-trends-briefing/scripts/briefing.mjs
提示:将 {workspace} 替换为你的 OpenClaw 工作区路径(通常为 ~/.openclaw/workspace 或你配置的工作区)。