- 授权协议: 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());
Java编程思想
[美] Bruce Eckel / 陈昊鹏、饶若楠 / 机械工业出版社 / 2005-9 / 95.00元
本书赢得了全球程序员的广泛赞誉,即使是最晦涩的概念,在Bruce Eckel的文字亲和力和小而直接的编程示例面前也会化解于无形。从Java的基础语法到最高级特性(深入的面向对象概念、多线程、自动项目构建、单元测试和调试等),本书都能逐步指导你轻松掌握。 从本书获得的各项大奖以及来自世界各地的读者评论中,不难看出这是一本经典之作。本书的作者拥有多年教学经验,对C、C++以及Java语言都有独到......一起来看看 《Java编程思想》 这本书的介绍吧!
