pforret/pf_pageparser
最新稳定版本:2.0.4
Composer 安装命令:
composer require pforret/pf_pageparser
包简介
Simple Regex Page Parser in PHP
README 文档
README
This is a HTML parser I've written because I scrape a lot of web sites to look for structured, repetitive data. This parser allows me to easily cleanup HTML, split it into chunks and find the right data in each chunk It does not use a DOM parser, so it also works on partial or invalid HTML
Installation
You can install the package via composer:
composer require pforret/pf_pageparser
Usage
$pp=New PfPageparser(["cacheTtl" => 300]); $pp->load_from_url("http://www.example.com/products") ->trim("<table","</table>") ->split_chunks('</tr>') ->filter_chunks('product_id') ->parse_from_chunks('|Price: [\d\.]*|',true); $prices=$pp->results();
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email peter@forret.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
PHP Package Boilerplate
This package was generated using the PHP Package Boilerplate.
统计信息
- 总下载量: 641
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-06-02