PHPackages                             hanccc/crawler - 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. hanccc/crawler

Abandoned → [hanccc/crawler](/?search=hanccc%2Fcrawler)Library[Utility &amp; Helpers](/categories/utility)

hanccc/crawler
==============

0.2.51(10y ago)5651MITPHP

Since May 19Pushed 7y ago1 watchersCompare

[ Source](https://github.com/HanSon/crawler)[ Packagist](https://packagist.org/packages/hanccc/crawler)[ RSS](/packages/hanccc-crawler/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (2)Versions (13)Used By (0)

crawler
=======

[](#crawler)

A easy package to crawl a site list and detail

Installation
------------

[](#installation)

```
composer require hanccc/crawler

```

usage
-----

[](#usage)

This package require [Goutte](https://github.com/FriendsOfPHP/Goutte), you can get the dom by `$this->crawler();` in both of list and detail.

### example

[](#example)

```
        //or $listCrawler = new ExampleListCrawler(storage_path('logs'));
        $listCrawler = new ExampleListCrawler('http://example.com', storage_path('logs'));
        $listCrawler->setDetailCrawler(new ExampleDetailCrawler());
        $listCrawler->start();

```

#### ListCrawler

[](#listcrawler)

```
class ExampleListCrawler extends ListCrawler{
    public $url = 'http://example.com';

    //return links per page
    public function getEachPageUrl($page)
    {
        return 'http://example.com/list&page=' . $page;
    }

    // get the maximum number of pages
    public function setMaxPage()
    {
        $this->maxPage = $num;
    }
}

```

#### DetailCrawler

[](#detailcrawler)

```
class ExampleDetailCrawler extends DetailCrawler{

    //Returns boolean
    public function isDetailUrl($url)
    {
        if(preg_match('/example.com\/id(\d+)/, $url))
            return true;
    }

    // what you want to do about the detail page
    public function handle()
    {
        echo $this->crawler->filter('title')->text();
    }
}

```

License
-------

[](#license)

Crawler is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 84.2% 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 ~70 days

Recently: every ~189 days

Total

12

Last Release

2915d ago

Major Versions

0.2.x-dev → v2.x-dev2018-06-30

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10583423?v=4)[hanson](/maintainers/hanson)[@Hanson](https://github.com/Hanson)

---

Top Contributors

[![Hanson](https://avatars.githubusercontent.com/u/10583423?v=4)](https://github.com/Hanson "Hanson (16 commits)")[![TinSkyFullOfStar](https://avatars.githubusercontent.com/u/13809581?v=4)](https://github.com/TinSkyFullOfStar "TinSkyFullOfStar (3 commits)")

### Embed Badge

![Health badge](/badges/hanccc-crawler/health.svg)

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)

PHPackages © 2026

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