Home  >  Article  >  Backend Development  >  phantomjs 新手一問

phantomjs 新手一問

WBOY
WBOYOriginal
2016-06-06 20:45:201001browse

爬了很多文,但是对于phantomjs 我实在是不知道要怎么用
我现在要抓 例如 http://www.cbssports.com/mlb/gametracker/live/MLB_20140528_CLE@CHW

下的所有数据

但phantomjs 是一个执行档!我要怎么用php 把phoantomjs 对于该网站跑的结果存成一个文本文件呢?

回复内容:

爬了很多文,但是对于phantomjs 我实在是不知道要怎么用
我现在要抓 例如 http://www.cbssports.com/mlb/gametracker/live/MLB_20140528_CLE@CHW

下的所有数据

但phantomjs 是一个执行档!我要怎么用php 把phoantomjs 对于该网站跑的结果存成一个文本文件呢?

你可以用File System模块将文本写入文件,或者输出到stdout,再将stdout重定向到你想要的文件里。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn