feat: 增强华能电商平台爬虫的反检测能力和数据结构
- 在 BidItem 实体中添加 priority 和 unit 字段,扩展数据结构 - 将爬虫浏览器模式改为非无头模式(headless: false)便于调试 - 为 ChngCrawler 添加人类行为模拟功能: * 模拟鼠标随机移动,增加移动步数和停顿时间 * 模拟人类滚动行为,包括随机滚动距离和停顿 * 添加 navigator 属性伪装,包括语言、插件等 - 在关键节点添加截图功能(bing.png, newPage.png, huaneng.png)用于调试 - 优化反检测策略,降低被目标网站识别为机器人的风险
This commit is contained in:
@@ -43,7 +43,7 @@ export class BidCrawlerService {
|
||||
}
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
headless: true,
|
||||
headless: false,
|
||||
args,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user