- 授权协议: MIT
- 开发语言: PHP
- 操作系统: 跨平台
- 软件首页: https://github.com/fabpot/Goutte
- 官方下载: https://github.com/fabpot/Goutte
软件介绍
Goutte 是一个抓取网站数据的 PHP 库。它提供了一个优雅的 API,这使得从远程页面上选择特定元素变得简单。
示例代码:
require_once '/path/to/goutte.phar';
use Goutte\Client;
//发送请求
$client = new Client();
$crawler = $client->request('GET', 'http://www.oschina.net/');
//点击链接
$link = $crawler->selectLink('Plugins')->link();
$crawler = $client->click($link);
//提交表单
$form = $crawler->selectButton('sign in')->form();
$crawler = $client->submit($form, array('signin[username]' => 'fabien', 'signin[password]' => 'xxxxxx'));
//提取数据
$nodes = $crawler->filter('.error_list');
if ($nodes->count())
{
die(sprintf("Authentication error: %s\n", $nodes->text()));
}
printf("Nb tasks: %d\n", $crawler->filter('#nb_tasks')->text());
JavaScript实战手册
David Sawyer McFarland / 李强 / 机械工业出版社 / 2009 / 89.00元
在《JavaScript实战手册》中,畅销书作者David McFarland教你如何以高级的方式使用JavaScript,即便你只有很少或者没有编程经验。一旦掌握了这种语言的结构和术语,你将学习如何使用高级的JavaScript工具来快速为站点添加有用的交互,而不是一切从头开始编写脚本。和其他的Missing Manuals图书不同,《JavaScript实战手册》清楚、精炼,手把手地讲解。 ......一起来看看 《JavaScript实战手册》 这本书的介绍吧!
