PHPackages                             napoleon/crawl - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. napoleon/crawl

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

napoleon/crawl
==============

HTML Crawler

v0.1.7(6y ago)111MITPHPPHP ^7.1CI failing

Since Oct 8Pushed 6y ago3 watchersCompare

[ Source](https://github.com/napoleon101392/Crawler)[ Packagist](https://packagist.org/packages/napoleon/crawl)[ RSS](/packages/napoleon-crawl/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (9)Dependencies (3)Versions (21)Used By (0)

[![](https://camo.githubusercontent.com/716c3b3a61c1aae2c2e12e5ab05ab6d93b9d6aa48fede330762031984b5e1913/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e61706f6c656f6e3130313339322f437261776c65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572 "Scrutinizer Code Quality")](https://camo.githubusercontent.com/716c3b3a61c1aae2c2e12e5ab05ab6d93b9d6aa48fede330762031984b5e1913/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e61706f6c656f6e3130313339322f437261776c65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)

### Quick example

[](#quick-example)

Consider this HTML to be the `$url`:

```
>

    I am a Page Title

         I am a row title

              Link 1
              Link 2

```

```
use Napoleon\Crawler\DOMDocument;

$url = 'https://www.example.com';
$document = new DOMDocument($url);

print_r($document->html()->get());
```

Above code result:

```
array:1 [
  0 => array:4 [
    "tagName" => "html"
    "attributes" => null
    "content" => ""
    "children" => array:2 [
      0 => array:4 [
        "tagName" => "head"
        "attributes" => null
        "content" => ""
        "children" => array:1 [
          0 => array:4 [
            "tagName" => "title"
            "attributes" => null
            "content" => "I am a Page Title"
            "children" => null
          ]
        ]
      ]
      1 => array:4 [
        "tagName" => "body"
        "attributes" => null
        "content" => ""
        "children" => array:1 [
          0 => array:4 [
            "tagName" => "section"
            "attributes" => null
            "content" => ""
            "children" => array:2 [
              0 => array:4 [
                "tagName" => "h3"
                "attributes" => null
                "content" => "I am a row title"
                "children" => null
              ]
              1 => array:4 [
                "tagName" => "ul"
                "attributes" => null
                "content" => ""
                "children" => array:2 [
                  0 => array:4 [
                    "tagName" => "li"
                    "attributes" => null
                    "content" => ""
                    "children" => array:1 [
                      0 => array:4 [
                        "tagName" => "a"
                        "attributes" => array:2 [
                          "class" => "anchor -success"
                          "href" => "/redirect/now/1"
                        ]
                        "content" => "Link 1"
                        "children" => null
                      ]
                    ]
                  ]
                  1 => array:4 [
                    "tagName" => "li"
                    "attributes" => null
                    "content" => ""
                    "children" => array:1 [
                      0 => array:4 [
                        "tagName" => "a"
                        "attributes" => array:2 [
                          "class" => "anchor"
                          "href" => "/redirect/now/2"
                        ]
                        "content" => "Link 2"
                        "children" => null
                      ]
                    ]
                  ]
                ]
              ]
            ]
          ]
        ]
      ]
    ]
  ]
]
...
```

#### Search by specific class name of a tag

[](#search-by-specific-class-name-of-a-tag)

Consider this to be `https://www.example.com`:

```
>

    I am a Page Title

         I am a row title

              Link 1
              Link 2

```

```
use Napoleon\Crawler\DOMDocument;

$url = 'https://www.example.com';
$document = new DOMDocument($url);
print_r($document->findByClass('anchor')->get());
```

The result above:

```
.array:2 [
  0 => array:3 [
    "tagName" => "a"
    "attributes" => array:2 [
      "class" => "anchor -success"
      "href" => "/redirect/now/1"
    ],
    "content" => "Link 1",
    "children" => null
  ]
  1 => array:3 [
    "tagName" => "a"
    "attributes" => array:2 [
      "class" => "anchor"
      "href" => "/redirect/now/2"
    ],
    "content" => "Link 2",
    "children" => null
  ]
]
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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 ~0 days

Total

18

Last Release

2397d ago

PHP version history (5 changes)v0.1.0PHP &gt;=5.6

v0.1.1.x-devPHP &gt;=5.6 &lt; 7.1

v0.1.3PHP 7.1

v0.1.3.1-devPHP &gt;=7.1

v0.1.7PHP ^7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0020c1340d0f613cec1b5d8d15e4bfac9af3da8fb6f40c4c93298961e8d0055b?d=identicon)[napoleon101392](/maintainers/napoleon101392)

---

Top Contributors

[![napoleon101392](https://avatars.githubusercontent.com/u/8497373?v=4)](https://github.com/napoleon101392 "napoleon101392 (61 commits)")

---

Tags

phpcrawlarray-to-htmlconvert htmlhtml to array

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/napoleon-crawl/health.svg)

```
[![Health](https://phpackages.com/badges/napoleon-crawl/health.svg)](https://phpackages.com/packages/napoleon-crawl)
```

###  Alternatives

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)[luka-dev/headless-task-server-php

Helper for sending requests to luka-dev/headless-task-server

109.6k](/packages/luka-dev-headless-task-server-php)

PHPackages © 2026

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