当前位置:网站首页>[软件] phantomjs屏幕截图
[软件] phantomjs屏幕截图
2022-07-01 07:18:00 【违规账号247188】
下载应用phantomjs-2.1.1-windows,解压压缩包
在bin路径下面,创建.txt,复制下面,保存,文件名改为demo.js
切换到bin路径下进入CMD
在CMD运行 phantomjs.exe demo2.js
var page = require('webpage').create();
//viewportSize being the actual size of the headless browser
page.viewportSize = { width: 1770, height: 750 };
//the clipRect is the portion of the page you are taking a screenshot of
page.clipRect = { top: 0, left: 0, width: 1770, height: 750 };
//the rest of the code is the same as the previous example
page.open('http://220.160.53.33:8903/case/sz22058', function (status) {
if (status !== 'success') {
console.log('Unable to load the address!');
phantom.exit();
} else {
window.setTimeout(function () {
page.render('肿瘤成绩.png');
phantom.exit();
}, 200); // Change timeout as required to allow sufficient time
}
});
边栏推荐
- [FPGA frame difference] FPGA implementation of frame difference target tracking based on vmodcam camera
- [programming training 2] sorting subsequence + inverted string
- TodoList经典案例①
- Kdtree notes
- C # read and write customized config file
- 【Flutter 问题系列第 72 篇】在 Flutter 中使用 Camera 插件拍的图片被拉伸问题的解决方案
- 【图像处理】图像直方图均衡化系统含GUI界面
- 【深圳IO】精确食品称(汇编语言的一些理解)
- [Electrical dielectric number] electrical dielectric number and calculation considering HVDC and facts components
- Warm congratulations on the successful listing of five elements hehe liquor
猜你喜欢

TodoList经典案例①

图像风格迁移 CycleGAN原理

ctfshow-web352,353(SSRF)

The computer has a network, but all browser pages can't be opened. What's the matter?

组件的自定义事件②

運維管理系統,人性化操作體驗

灰度何以跌下神坛?

【深圳IO】精确食品称(汇编语言的一些理解)
![[Electrical dielectric number] electrical dielectric number and calculation considering HVDC and facts components](/img/7c/2b1d4797f367cced51f36e8a1bb199.png)
[Electrical dielectric number] electrical dielectric number and calculation considering HVDC and facts components

Will Internet talents be scarce in the future? Which technology directions are popular?
随机推荐
EasyNVS云管理平台功能重构:支持新增用户、修改信息等
[chapter 72 of the flutter problem series] a solution to the problem that pictures taken in the flutter using the camera plug-in are stretched
Open source! Wenxin large model Ernie tiny lightweight technology, accurate and fast, full effect
在长城证券上做基金定投安全吗?
We found a huge hole in MySQL: do not judge the number of rows affected by update!!!
热烈祝贺五行和合酒成功挂牌
weback5基础配置详解
北漂程序员深夜emo发帖求助:女朋友走了我很孤独 ......
vscode 根据 ESLint 规范自动格式化代码
【深圳IO】精确食品称(汇编语言的一些理解)
Reply and explanation on issues related to "online training of network security education in 2022"
MySQL and redis consistency solution
【编程强训3】字符串中找出连续最长的数字串+数组中出现次数超过一半的数字
[lingo] find the shortest path problem of undirected graph
DC-4靶机
Do securities account opening affect the security of account opening
[programming training] delete public characters (hash mapping) + team competition (greedy)
微软宣布开源 (GODEL) 语言模型聊天机器人
【微服务|openfeign】Feign的日志记录
【LINGO】求无向图的最短路问题