【文件属性】:
文件名称:tokio:Web抓取变得简单
文件大小:51KB
文件格式:ZIP
更新时间:2021-03-03 03:36:18
JavaScript
东京
网页抓取变得简单。
特征
建立在的顶部。
它在页面上运行内联脚本和外部脚本。
您可以添加资源过滤器以不加载某些外部资源。
简单快速,仅需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 $
【文件预览】:
tokio-master
----circle.yml(565B)
----__test__()
--------index.test.js(730B)
----.gitattributes(12B)
----yarn.lock(161KB)
----LICENSE(1KB)
----README.md(4KB)
----.editorconfig(187B)
----.gitignore(13B)
----index.js(3KB)
----package.json(721B)