PHPackages                             jerodev/diglett - 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. jerodev/diglett

Abandoned → [jerodev/diggy](/?search=jerodev%2Fdiggy)Library[Utility &amp; Helpers](/categories/utility)

jerodev/diglett
===============

An unbreakable php web scraper

v1.1.7(6y ago)3448MITPHPPHP ^7.1.18CI failing

Since Nov 2Pushed 6y ago2 watchersCompare

[ Source](https://github.com/jerodev/diglett)[ Packagist](https://packagist.org/packages/jerodev/diglett)[ RSS](/packages/jerodev-diglett/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (8)Dependencies (4)Versions (13)Used By (0)

Diglett Web Scraper
===================

[](#diglett-web-scraper)

[![Build Status](https://camo.githubusercontent.com/69fcd93f2caaeddc6ad74e6bd82c0bf2a83a859fe129b61e24d475286aee6591/68747470733a2f2f7472617669732d63692e6f72672f6a65726f6465762f6469676c6574742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jerodev/diglett) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/faa3d4f25522d509ce9a44dfaeee6015da026de11c7310ca51f314865749d410/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a65726f6465762f6469676c6574742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/jerodev/diglett/?branch=master) [![StyleCI](https://camo.githubusercontent.com/21b2f1b3a4395c1e8491ebb1be66bec3dd5019c8de963882d414451d6a650080/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3135313330353538332f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/151305583)

Diglett is an extended web crawler based on the [Symfony DomCrawler Component](https://symfony.com/doc/current/components/dom_crawler.html). It allows to use extended and custom css selectors to easily get data from a web page.

Requirements
------------

[](#requirements)

- PHP 7.1.18 or higher

How to use
----------

[](#how-to-use)

Diglett includes a webclient that returns a Diglett instance, but you can also inject your own Symfony Crawler object into the Diglett class. From your Diglett object, you can start using the different functions that implement the specialized css filter functions.

```
$diglett = \Jerodev\Diglett\WebClient::get('https://www.tabletopfinder.eu/');
$firstParagraph = $diglett->getText("p:first()");
```

Built-in selector functions
---------------------------

[](#built-in-selector-functions)

FunctionDescriptionExample**:containsregex(str)**Get the elements where the text content matches a regular expression`div p:containsregex([Hh]el+o)`**:containstext(str)**Get the elements where the text content contain this substring`div p:containstext(Hello World)`**:first()**Get the first element in a collection`ul li:first()`**:last()**Get the last element in a collection`ul li:last()`**:next()**Get the first sibling to the current element if available`ul.test:next() li`**:nth(x)**Get the nth element in a collection (starting at 1)`ul li:nth(3)`**:prev()**Get previous sibling to the current element if available`ul li:last():prev()`**:text(str)**Get elements that exactly have this innerText`ul li:text(Hello World)`

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

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

Recently: every ~78 days

Total

9

Last Release

2209d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/de99d8fde875ca88a6b812d7b4ab34f0e4a198cd1a7443ca09df33f943c02379?d=identicon)[jerodev](/maintainers/jerodev)

---

Top Contributors

[![jerodev](https://avatars.githubusercontent.com/u/3493941?v=4)](https://github.com/jerodev "jerodev (66 commits)")

---

Tags

phpwebscraper

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jerodev-diglett/health.svg)

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

###  Alternatives

[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[ashallendesign/favicon-fetcher

A Laravel package for fetching website's favicons.

190272.4k3](/packages/ashallendesign-favicon-fetcher)[dominikb/composer-license-checker

Utility to check for licenses of dependencies and block/allow them.

563.8M9](/packages/dominikb-composer-license-checker)[helgesverre/extractor

AI-Powered Data Extraction for your Laravel application.

22128.0k](/packages/helgesverre-extractor)[visuellverstehen/statamic-classify

A useful helper to add CSS classes to all HTML tags generated by the bard editor.

20116.8k](/packages/visuellverstehen-statamic-classify)

PHPackages © 2026

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