nicksagona / pop-spider
一个简单的用于SEO分析的网站爬虫。
4.0.2
2023-09-03 04:53 UTC
Requires
- php: >=7.4.0
- popphp/pop-console: ^3.2.1
- popphp/pop-http: ^4.2.0
- popphp/pop-view: ^3.3.1
- popphp/popphp: ^3.7.2
Requires (Dev)
- phpunit/phpunit: ^9.5.0
This package is auto-updated.
Last update: 2024-08-28 16:56:26 UTC
README
pop-spider
是一个简单的由CLI驱动的用于SEO分析的网站爬虫,它使用了Pop PHP框架的组件。它解析网站中的SEO相关数据,并生成一个基于HTML的报告以及一个 sitemap.xml 文件。
版本信息
pop-spider 4.0.0 版本发布
2023年8月12日
安装
$ composer create-project nicksagona/pop-spider pop-spider
快速使用
$ cd pop-spider/script
$ ./spider crawl http://www.mydomain.com/
概述
默认情况下,爬虫会解析以下元素及其SEO相关属性
- 标题
- 元数据
- 名称
- 内容
- 链接
- 链接
- 标题
- 关系
- 名称
- 值
- 图片
- 源
- 标题
- 替代文本
- 标题1
- 标题2
- 标题3
您可以通过 --tags=
选项解析额外的标签。
$ ./spider help Display this help screen.
$ ./spider crawl [--dir=] [--tags=] [--speed=] [--save] <url> Crawl the URL.
The optional [--dir=] parameter allows you to set the output directory for the results report.
The optional [--tags=] parameter allows you to set additional tags to scan for in a comma-separated list.
The optional [--speed=] parameter will throttle the speed between each request in seconds.
The optional [--save] parameter will save the site files into a directory
Example:
$ ./spider crawl --dir=seo-report --tags=b,u --speed=5 --save http://www.mydomain.com/