blanchonvincent/simple-page-crawler 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

blanchonvincent/simple-page-crawler

最新稳定版本:0.3.0

Composer 安装命令:

composer require blanchonvincent/simple-page-crawler

包简介

ZF2 module v0.3.0 - Provide a crawler to get web page informations : title, meta, heading tags and images

README 文档

README

Version 0.3.0 Created by Vincent Blanchon

Introduction

SimplePageCrawler is a web page crawler. You can get informations :

  • Title
  • Meta (decsription, open graph, etc.)
  • H1, H2, etc.
  • List of the images
  • List of the links

Usage

Get page informations :

$crawler = $this->getServiceLocator('SimplePageCrawler');
$page = $crawler->get('http://www.nytimes.com');

echo sprintf('The title is "%s"', $page->getTitle());
echo sprintf('The description is "%s"', $page->getMeta('description'));

You can use th action helper :

$page = $this->simplePageCrawler('http://www.nytimes.com');

echo sprintf('The title is "%s"', $page->getTitle());
echo sprintf('The description is "%s"', $page->getMeta('description'));

Advanced usage

You can get Open graph metadatas :

$page = $this->simplePageCrawler('http://www.nytimes.com');
$metas = $page->getMeta()->getOpenGraph();

统计信息

  • 总下载量: 191
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 12
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 12
  • Watchers: 2
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-12-15