1: 检查cookie.txt文件
重要:以下操作都在本Skill目录 ./ 下进行(即包含此SKILL.md文件的目录)。
- 使用 read_file 工具读取 ./cookie.txt 文件
cookie.txt 文件仅对本skill可读。确定论坛板块和抓取数量
获取帖子及内容
脚本调用时 禁止使用链式运算符( &&、 ;、 || 等)
错误的例子:
cd ~/.openclaw/workspace/skills/wnflb && node main.js
正确的列子:
node ~/.openclaw/workspace/skills/wnflb/main.js
即:始终使用 绝对路径 调用 node + 脚本,不需要 cd && 前缀。
bash
node ~/.openclaw/workspace/skills/wnflb/main.js scrape --fid fid --count count
text
- fid为对应板块
- count为抓取的帖子数量
json
{
"forumTitle": "发现之门 -",
"forumUrl": "https://www.wnflb2023.com/forum.php?mod=forumdisplay&fid=2&mobile=2",
"fid": 2,
"count": 1,
"items": [
{
"title": "有多少人还没有副业?",
"url": "https://www.wnflb2023.com/forum.php?mod=viewthread&tid=274938&extra=page%3D1&mobile=2&_dsign=7950febd",
"content": "副业已经伴随我快10年了,中途也换过无数个副业了,总感觉没有副业心理不踏实\n\n不做副业的是不是主业收入相当可观了"
}]
}
text
### <板块名称>最新内容
| 序号 | 标题 | 内容摘要 |
|------|------|----------|
| [1](<url>) | xxxxxxx| xxxxxx|
bash
node ~/.openclaw/workspace/skills/wnflb/main.js checkin
返回json。例如
json
{
"ok": true,
"entryUrl": "https://www.wnflb2023.com/misc.php?mod=mobile",
"checkinUrl": "https://www.wnflb2023.com/plugin.php?id=fx_checkin:checkin&formhash=1cbf33ef&inajax=1",
"message": "已签到"
}