1. 首页
  2. 数据库
  3. 其它
  4. tokio:Web抓取变得简单 源码

tokio:Web抓取变得简单 源码

上传者: 2021-05-03 06:01:05上传 ZIP文件 50.91KB 热度 30次
东京 网页抓取变得简单。 特征 建立在的顶部。 它在页面上运行内联脚本和外部脚本。 您可以添加资源过滤器以不加载某些外部资源。 简单快速,仅需100 SLOC,并且不需要电子或Chrome。 安装 yarn add tokio 目录 用法 const Tokio = require ( 'tokio' ) const tokio = new Tokio ( { url : 'https://some-website.com' } ) tokio . fetch ( ) . then ( html => { console . log ( html ) //=> string // Query HTML with cheerio (server-side jQuery) // https://github.com/cheeriojs/cheerio const $
用户评论