Skip to content

Conversation

@conchz
Copy link
Contributor

@conchz conchz commented Nov 23, 2014

The PhantomJSDownloader is used to download pages which need to render the javascript. Such as, taobao.
I hope it's useful for you.

@code4craft
Copy link
Owner

  1. 这类扩展放到extension包更合适。
  2. 能说明一下具体依赖的环境么?

@conchz
Copy link
Contributor Author

conchz commented Nov 26, 2014

Phantomjs适合用来解析带javascript的网页, 在http://phantomjs.org/下载安装包搭建运行环境即可, 以Linux为例, 解压后设置环境变量export PhantomJS_HOME=/usr/local/phantomjs-1.9.8. 然后运行我所提供的crawl.js, 命令行调用方式: phantomjs crawl.js http://www.baidu.com 即可获取html文本.代码我会移动到extension中去

@code4craft code4craft merged commit 37cb43b into code4craft:master May 8, 2016
@code4craft code4craft added this to the WebMagic-0.6.0 milestone May 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants