#!/usr/bin/env node const { collectKs, collectHotList, mergeAll } = require('./ks-collect'); const TARGET_KEYWORDS = [ { kw: '黑中介', videos: 20, commentPages: 2, hypotheses: ['H6', 'H4'] }, { kw: '入职被坑', videos: 20, commentPages: 2, hypotheses: ['H6', 'H8'] }, { kw: '押金不退', videos: 20, commentPages: 2, hypotheses: ['H6', 'H8'] }, { kw: '工资日结', videos: 20, commentPages: 2, hypotheses: ['H2', 'H3'] }, { kw: '当天入职', videos: 20, commentPages: 2, hypotheses: ['H3', 'H4'] }, { kw: '真实薪资', videos: 20, commentPages: 2, hypotheses: ['H2', 'H5'] }, { kw: '工作环境真实', videos: 20, commentPages: 2, hypotheses: ['H7', 'H5'] }, { kw: '快手求职', videos: 20, commentPages: 2, hypotheses: ['H1', 'H8'] }, { kw: '工厂打工', videos: 20, commentPages: 2, hypotheses: ['H1', 'H3', 'H7'] }, ]; const TARGET_HOTLISTS = [ { id: 'hotShare', name: '热门', hypotheses: ['H1', 'H5', 'H8'] }, { id: 'job', name: '职场', hypotheses: ['H1', 'H2', 'H4', 'H6'] }, { id: 'recruit', name: '招聘', hypotheses: ['H1', 'H3', 'H4'] }, ]; async function main() { const args = new Set(process.argv.slice(2)); const includeHotlist = args.has('--hotlist'); const skipMerge = args.has('--no-merge'); for (const task of TARGET_KEYWORDS) { await collectKs(task, { force: true }); } if (includeHotlist) { for (const task of TARGET_HOTLISTS) { await collectHotList(task, { force: true }); } } if (!skipMerge) mergeAll(); } main().catch((error) => { console.error(error); process.exit(1); });