且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Linux租用的服务器上免费获取服务器端的网站截图

更新时间:2023-11-27 22:05:04

PhantomJs是解决方案

if(phantom.state.length === 0){
  phantom.state = '0_home';
  phantom.open('http://www.mini.de');
}
else if(phantom.state === '0_home'){
  phantom.viewportSize = {width: 800, height: 600};
  phantom.sleep(2000);
  phantom.render('home.png');
  phantom.exit(0);
}