编写爬虫会使用到的一些模块

  1. 1. 参考资料
  • request 模块

    用于简化HTTP请求

  • cheerio 模块

    jquery core 的子集,实现了与DOM操作无关的API

  • async 模块

    用于简化异步代码的编写

  • debug 模块

    用于显示调试信息

  • cron 模块

    用于定时执行任务

  • child_process API

    用于启动新的进程

  • pm2 模块

    用于自动重启程序

  • uncaughException 处理错误

    process.on(‘uncaughtException’, function (err) {

      console.error('uncaughtException: ', err.stack);
    

    })

参考资料

  1. request模块
  2. cheerio模块
  3. async模块
  4. debug模块
  5. child_process
  6. pm2
  7. uncaughtException