- 授权协议: 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());
文明之光 (第三册)
吴军 / 人民邮电出版社 / 2015-1-1 / 59
【《文明之光》系列荣获由中宣部、中国图书评论学会和中央电视台联合推选的2014“中国好书”奖】 吴军博士从对人类文明产生了重大影响却在过去被忽略的历史故事里,选择了有意思的几十个片段特写,以人文和科技、经济结合的视角,有机地展现了一幅人类文明发展的宏大画卷。 《文明之光 》系列大致按照从地球诞生到近现代的顺序讲述了人类文明进程的各个阶段,每个章节相对独立,全景式地展现了人类文明发展历程......一起来看看 《文明之光 (第三册)》 这本书的介绍吧!
