2.0.8 • Published 5 months ago
@karinjs/puppeteer-core v2.0.8
@karinjs/puppeteer-core
描述
轻量·高效·易用的 Puppeteer 截图、视频生成工具。
安装
npm install @karinjs/puppeteer-core使用方法
import fs from 'fs'
import Puppeteer from '@karinjs/puppeteer-core'
// 使用示例
const chrome = new Puppeteer()
await chrome.init()
/** 计算耗时 */
console.time('截图耗时')
const image = await chrome.screenshot({
file: 'https://baidu.com/',
fullPage: true,
pageGotoParams: {
waitUntil: 'networkidle2',
},
type: 'png',
setViewport: {
deviceScaleFactor: 3,
},
})
console.timeEnd('截图耗时')
fs.writeFileSync('image.png', image)
process.exit(0)许可证
本项目使用 MIT License 许可协议。详见 LICENSE 文件。
使用的第三方库
本项目使用了以下开源库:
- puppeteer-core: 用于浏览器自动化操作,使用了 Apache License 2.0 许可协议。
贡献
欢迎贡献代码和建议!
1.2.0
12 months ago
1.1.1
1 year ago
1.1.0
1 year ago
1.4.5
11 months ago
1.6.2
5 months ago
1.4.4
11 months ago
1.0.8
1 year ago
1.6.1
10 months ago
1.4.3
11 months ago
1.0.7
1 year ago
1.6.0
11 months ago
1.5.1
11 months ago
1.4.2
11 months ago
1.5.0
11 months ago
1.4.1
11 months ago
1.1.4
12 months ago
1.4.0
11 months ago
1.1.3
1 year ago
1.3.0
11 months ago
1.2.1
12 months ago
1.1.2
1 year ago
2.0.3
8 months ago
2.0.2
8 months ago
2.0.5
8 months ago
2.0.4
8 months ago
2.0.8
7 months ago
2.0.1
8 months ago
2.0.0
8 months ago
1.0.6
1 year ago
1.0.5
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago