PHPackages                             kosuha606/html-uni-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. kosuha606/html-uni-parser

ActiveComposer-pugin[Parsing &amp; Serialization](/categories/parsing)

kosuha606/html-uni-parser
=========================

Uni parser for sites

1.0.16(6y ago)050[2 issues](https://github.com/kosuha606/html-uni-parser/issues)PHPPHP &gt;=7.0.0CI failing

Since Jun 23Pushed 6y agoCompare

[ Source](https://github.com/kosuha606/html-uni-parser)[ Packagist](https://packagist.org/packages/kosuha606/html-uni-parser)[ RSS](/packages/kosuha606-html-uni-parser/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (4)Versions (18)Used By (0)

HtmlUniParser
-------------

[](#htmluniparser)

[![Build Status](https://camo.githubusercontent.com/acecdbf0e94befc1bfd12a425a53f2032dce53337e91e907eec34ac31a4c2153/68747470733a2f2f7472617669732d63692e6f72672f6b6f737568613630362f68746d6c2d756e692d7061727365722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/kosuha606/html-uni-parser)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/587a16647f40bc20c53ce8ad4f3e3f2ba487466cdfc63df0440a32ec2a0f7a77/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b6f737568613630362f68746d6c2d756e692d7061727365722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/kosuha606/html-uni-parser/?branch=master)

Universal html parser which can parse every kind of html page

### Installation

[](#installation)

To install this plugin use composer:

```
$ composer require kosuha606/html-uni-parser
```

### Usage

[](#usage)

There is four available types of parsing html.

Example:

```
$results = HtmlUniParser::create([
    'pageUrl' => 'http://example.com',
    'xpathOnCard' => [
        'h1' => '//h1',
        'description' => 'HTML//p'
    ]
])->parseCard();
```

### Examples

[](#examples)

For more examples see the `examples/` direcotry

### Description of configurable properties

[](#description-of-configurable-properties)

PropertyDescriptioncatalogUrlThe url address for parsing by catalog strategy `parseCatalog()`searchUrlThe url what used to search on goal site. `parseSearch()`pageUrlThe url what used to parse one page. `parseCard()`urlGeneratorCallback function what can be used to generate links to parse `parseGenerator()`encodingThe encoding of goal sitesiteBaseUrlBase url for process links after parseresultLimitHere you can limit the results countsleepAfterRequestNumber of seconds to sleep after each requestgoIntoCardWheather need to go into card when parse catalog linksxpathItemXpath query what can be used for parse items in listxpathLinkXpath query what can be used for parse link inside parsed itemxpathOnCardArray of xpath queries, every key will be key in result arraytypeMechType of parsing mechanizm, for example: `wget`, `curl`, `phantomjs`, `filegetcontents`forceOuterHtmlForce parser to use outer html for xpaths### Available methods

[](#available-methods)

MethodDescriptionparseCatalogTo parse catalog links and parse every link this function reutrn results as array of parsed linksparseSearchThis method takes an argument of query string for search page and after building search link it behave like parseCatalogparseCardTo parse one page of siteparseGeneratorTo parse links what was generated by urlGenerator callback### Run tests

[](#run-tests)

To run tests you can use this command:

```
./vendor/bin/phpunit
```

###  Health Score

27

—

LowBetter than 46% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~16 days

Recently: every ~59 days

Total

17

Last Release

2345d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/27a12ec357ed02f6b7c3cbfcfffd15e41c1c71fb61e93ae2bf34c0612c60823a?d=identicon)[kosuha606](/maintainers/kosuha606)

---

Top Contributors

[![kosuha606](https://avatars.githubusercontent.com/u/13706149?v=4)](https://github.com/kosuha606 "kosuha606 (17 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kosuha606-html-uni-parser/health.svg)

```
[![Health](https://phpackages.com/badges/kosuha606-html-uni-parser/health.svg)](https://phpackages.com/packages/kosuha606-html-uni-parser)
```

###  Alternatives

[php-vcr/php-vcr

Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.

1.2k3.3M144](/packages/php-vcr-php-vcr)[flix-tech/avro-serde-php

A library to serialize and deserialize Avro records making use of the confluent schema registry

674.3M22](/packages/flix-tech-avro-serde-php)[mailersend/mailersend

MailerSend PHP SDK

821.3M9](/packages/mailersend-mailersend)[friendsofcxml/cxml-php

PHP Implementation of cXML Standard

17179.1k10](/packages/friendsofcxml-cxml-php)[swoole-bundle/swoole-bundle

Open/Swoole Symfony Bundle

7266.2k](/packages/swoole-bundle-swoole-bundle)[brandembassy/query-language-parser

11110.4k](/packages/brandembassy-query-language-parser)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
