码迷,mamicode.com
首页 > Web开发 > 详细

下载网页,或者监控的工具

时间:2017-03-10 00:57:25      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:function   captures   history   require   success   

pmui:https://github.com/fouber/pmui

An UI wrapper of page-monitor, to show webpage history captures and diff them.


page-monitor: https://github.com/fouber/page-monitor

监视页面变化


都来源于这个phantomjs http://phantomjs.org/download.html

用法看文档,可以抓取js


以前写的一个下载页面的例子:

var page = require(‘webpage‘).create();
page.open(‘http://yoursite.com/index.php‘, function (status) {
//Page is loaded!
if (status !== ‘success‘) {
console.log(‘‘);
} else {
console.log(page.content);
}
phantom.exit();
});

写成bat文件,另存为本地文件

@echo off
echo downloading...
d:
cd D:\myworkphantomjs.exe download.js > index.html
echo write file success


跟着程序再进行分析

下载网页,或者监控的工具

标签:function   captures   history   require   success   

原文地址:http://xiaosa.blog.51cto.com/665033/1904883

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!