打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
puppeteer基本用法(puppeteer教程)
userphoto

2022.11.22 四川

关注
(async () => {     const browser = await puppeteer.launch({headless:true});     const page = await browser.newPage();     await page.goto('https://jr.dayi35.com');     await page.setViewport({width:1920, height:1080});     const documentSize = await page.evaluate(() => {         return {             width: document.documentElement.clientWidth,             height : document.body.clientHeight,         }     })     await page.screenshot({path:"example.png", clip : {x:0, y:0, width:1920, height:documentSize.height}});     await browser.close();
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
.NET中实现HTML生成图片或PDF的几种方式
puppeteer实现线上服务器任意区域截图
java+puppeteer实现html转pdf文件
puppeteer学习(二)
centos下使用puppeteer进行网页截图截图常见问题:
phantomJs之殇,chrome
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服