承接 xparse/element-finder 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

xparse/element-finder

最新稳定版本:3.0.0

Composer 安装命令:

composer require xparse/element-finder

包简介

Elegant data scrapping

README 文档

README

Latest Version Software License CI codecov Total Downloads

Extract data from html with elegant xpath/css expressions and prepare data with regexp in single line.

Install

Via Composer

$ composer require xparse/element-finder

Usage

 $page = new ElementFinder($html); $title = $page->value('//title')->first(); echo $title; 

Advanced usage with regexp

$page = new \Xparse\ElementFinder\ElementFinder('<html>   <div class="tels">  044-12-12,  258-16-16 </div>  <div class="tels">  (148) 04-55-16 </div>    </html>'); $tels = $page->value('//*[@class="tels"]')->split('!,!')->replace("![^0-9]!"); print_r($tels); /*   [0] => 0441212  [1] => 2581616  [2] => 148045516  */ 

Css selectors

Read this document. Using css selectors.

Testing

 ./vendor/bin/phpunit

Contributing

Please see CONTRIBUTING for details.

Credits

Xpath info

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 43.88k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 35
  • 点击次数: 0
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 34
  • Watchers: 2
  • Forks: 15
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固