manishgs/scraper

PHP 网页抓取包

安装: 23

依赖: 0

建议: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

类型:应用程序

v0.1.1 2015-12-10 15:18 UTC

This package is not auto-updated.

Last update: 2024-09-14 18:47:27 UTC


README

此包使用 Goutte 来爬取网页并从 URL 中提取数据(favicon,标题,描述,特色图像等)。

安装

在您的 composer.json 文件中将 manishgs/scraper 添加为依赖项

composer require manishgs/scraper:^0.1.0

用法

use Scraper\Grab;

// create new Grab 
$grab = new Grab();

// set Url    
$grab = $grab->setUrl('http://google.com');

// extract data
$article = $grab->getInfo();

print_r($article);