网页爬虫的一些笔记

可参考: http://blog.csdn.net/kandy_ye/article/details/47324715

其中phantomjs 2.0以后的版本,exe程序放在了bin目录中,需要将环境变量修改为bin目录下

乱码解决方案:

http://blog.sina.com.cn/s/blog_6264e0aa0102w1sq.html

页面中注入jquery

firefox 安装firebug 然后安装 firequery插件

https://addons.mozilla.org/en-US/firefox/addon/firequery/?src=search]

如果安装的时候,提示不支持

那么就在附加组件中搜索

FireQuery

然后点击安装

fopen

OPEN_MODE是打开模式,'R'是读文本,'W'是写文本,'A'是附加文本,参数不分大小写,如果指定'A'但是文件不存在,它会用'W'先创建出来,'W'有覆盖的功能;

casperjs 里的fs不是nodejs里的fs,而是

phantomjs的fs模块

http://phantomjs.org/api/fs/method/write.html

原文地址:https://www.cnblogs.com/xinzhyu/p/5238334.html