【文件属性】:
文件名称:taki:拍摄任何网站的快照
文件大小:59KB
文件格式:ZIP
更新时间:2021-05-22 19:30:36
crawler prerender snapshot TypeScript
塔基
安装
npm i taki
构建在Google 的顶部,有关jsdom / chromy版本的信息,请访问。
用法
const { request } = require ( 'taki' )
// Prerender this page to static HTML
// Wait for 1s since this page renders remote markdown file
request ( { url : 'https://sao.js.org' , wait : 1000 } ) . then ( ( html ) => {
// serialized html string of target url
console . log ( html )
} )
注意:当您不再使用request时,您需要调用cleanup :
import { clea
【文件预览】:
taki-master
----package.json(1KB)
----test()
--------server()
--------snapshots()
--------index.test.ts(1KB)
----.prettierrc(43B)
----LICENSE(1KB)
----src()
--------index.ts(4KB)
--------find-chrome.ts(1KB)
----tsconfig.json(6KB)
----.gitignore(18B)
----circle.yml(681B)
----README.md(4KB)
----yarn.lock(111KB)
----.editorconfig(187B)
----.gitattributes(12B)
----declarations.d.ts(22B)