diff --git a/spider.mjs b/spider.mjs index 67f8a08..6d61c41 100644 --- a/spider.mjs +++ b/spider.mjs @@ -49,7 +49,6 @@ import path from 'node:path'; //spider run let spider_is_running = false, last_run_time = 0; - let last_douyin_mode = 'pc'; const task_check_time = 20; //每 20 秒抓取一次 const task_auto_run = cron.schedule(`*/${task_check_time} * * * * *`, async () => { const current_time = common.getTimestampInSeconds(); @@ -71,7 +70,7 @@ import path from 'node:path'; switch (botName) { case 'douyin': bot = new Douyin(heroCloudServer); - bot.setMode(last_douyin_mode); + bot.setMode('mob'); //使用手机模式 break; case 'kuaishou': bot = new Kuaishou(heroCloudServer); @@ -92,11 +91,6 @@ import path from 'node:path'; const data = await bot.scrap(task.url); //console.log('Data got by bot', data); - //为抖音切换模式 - if (bot.name == 'douyin') { - last_douyin_mode = last_douyin_mode == 'pc' ? 'mob' : 'pc'; - } - if (typeof(data.done) != 'undefined' && data.done == true) { task.data = data; //把抓取到的数据保存到任务里 taskMoniter.updateTask(task.id, task);