python爬虫中PhantomJS测试页面的方法

  介绍

这篇文章将为大家详细讲解有python爬关虫中PhantomJS测试页面的方法,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

var  page =,要求(& # 39;网页# 39;)共创(),   system =,才能要求(& # 39;系统# 39;),   ,,t,地址;   ,,   ,var  page =,要求(& # 39;网页# 39;)共创(),   system =,才能要求(& # 39;系统# 39;),   ,,t,地址;   ,   if  (system.args.length ===, 1), {   console.log才能(& # 39;用法:,loadspeed.js  & lt; some  URL> & # 39;);   phantom.exit才能();   }   ,   时间=t  Date.now ();   时间=address  system.args [1];   page.open(地址,函数(状态),{   if 才能;(status  !==, & # 39;成功# 39;),{   ,,,console.log (& # 39; FAIL 用load 从而解决# 39;);   ,,},{else    ,,,t =, Date.now(),安康;t;   ,,,console.log (& # 39; Loading  & # 39;, +, system.args [1]);   ,,,console.log (& # 39; Loading  time  & # 39;, +, t  +, & # 39;, msec # 39;);   ,,}   phantom.exit才能();   });

phantomjs  loadspeed.js  http://cuiqingcai.com

Loading  http://cuiqingcai.com   Loading  time  11678, msec

关于python爬虫中PhantomJS测试页面的方法就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看的到。

python爬虫中PhantomJS测试页面的方法