Install
openclaw skills install @powerzzjohn/pc368-filter-analyzeropenclaw skills install @powerzzjohn/pc368-filter-analyzer当用户明确表达以下意图时启动本技能(任一匹配即触发):
技能启动后,先向用户确认以下两项信息(必须获取后才能继续):
确认格式示例:
请提供3个合数(如4,6,8)和本次统计期数X(如60)。
确保浏览器已启动,然后打开 https://pc368.net/:
使用 browser 工具打开:
{"action":"open","url":"https://pc368.net/","label":"pc368-screener"}
等待页面加载后,用 snapshot 或 evaluate 确认页面状态。
首次访问可能有"知道了!"弹窗,先尝试关闭:
若弹窗已关闭或无弹窗,直接继续。
找到结果表格(通常是页面上的第3个 table,即 document.querySelectorAll('table')[2]),提取数据:
() => {
const t2 = document.querySelectorAll('table')[2];
const rows = t2.querySelectorAll('tr');
const data = [];
for (let i = 1; i < rows.length; i++) {
const cells = rows[i].querySelectorAll('td');
if (cells.length >= 3) {
const issue = cells[0].textContent.trim();
const nums = cells[2] || cells[1];
const numsStr = (nums ? nums.textContent.trim() : '');
if (issue && !isNaN(parseInt(issue)) && numsStr.includes('+')) {
data.push({issue, time: cells[1]?.textContent?.trim() || '', nums: numsStr});
}
}
}
return data;
}
当前页面默认显示约30条数据。每次点击"加载更多"约增加30条。
如果当前提取的数据中有效条数不足 X 条:
document.getElementById('addmore') 或 document.querySelector('#addmore a')el.scrollIntoView({behavior:'instant',block:'center'}); el.click();注意:每次加载更多后需要重新提取全部数据,因为表格会追加新行。
在获取到 X 条有效数据后,执行筛选计算。注意先去重(按期号 issue 去重,保留首次出现)。
筛选逻辑:
完整的 evaluate 函数参考技能详细说明。
📊 PC368 筛选统计结果
━━━━━━━━━━━━━━━━━━━━━━
统计期数范围:{startIssue} 期 至 {endIssue} 期(共 {xPeriods} 期)
目标合数:{a}, {b}, {c}
✅ 符合条件的期数:{matchedPeriods} 期
❌ 排除的期数(三重/三连):{excludedPeriods} 期
📈 占 {xPeriods} 期总数的:{percentage}
💰 盈亏计算:
{matchedPeriods} × 995 - {xPeriods} × 630 = {profit} 元
━━━━━━━━━━━━━━━━━━━━━━
任务完成后,关闭浏览器标签(如有需要)。
一位数合数:4, 6, 8, 9 其他数字(0,1,2,3,5,7)不是合数,需要提醒用户重新选择。