PHPackages                             opportus/web-scraper - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. opportus/web-scraper

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

opportus/web-scraper
====================

A web scraper taking as arguments a list of URIs and a list of XPath queries to perform on each document. Returns an instance of DataInterface.

v2.0.0(7y ago)14MITPHPPHP ^7.2

Since Nov 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/opportus/web-scraper)[ Packagist](https://packagist.org/packages/opportus/web-scraper)[ RSS](/packages/opportus-web-scraper/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (1)Versions (5)Used By (0)

Web Scraper
===========

[](#web-scraper)

A web scraper taking as arguments a list of URIs and a list of XPath queries to perform on each document. Returns an instance of [`DataInterface`](https://github.com/opportus/web-scraper/blob/master/src/DataInterface.php).

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

[](#installation)

```
$ composer require opportus/web-scraper
```

Usage
-----

[](#usage)

```
Use Opportus\WebScraper\WebScraper;

$uris = [
    'https://en.wikipedia.org/wiki/Web_scraping',
    'https://en.wikipedia.org/wiki/XPath',
];

$queries = [
    '//p[1][node()]',
    '//div[@id="mw-normal-catlinks"]/ul//li[node()]',
];

$scraper = new WebScraper();

$data = $scraper->scrap($uris, $queries); // @see https://github.com/opportus/web-scraper/blob/master/src/DataInterface.php
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

4

Last Release

2693d ago

Major Versions

v1.0.0.x-dev → v2.0.02018-12-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c6ed3ce0fc49269e52a4b9afa7f4e52b83dab499856a88f1e530df6a92ed6dc?d=identicon)[opportus](/maintainers/opportus)

---

Top Contributors

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

---

Tags

csvjsonweb-scraperweb-scrapingweb-scrapperweb-scrappingwebscraperwebscrapingwebscrapperwebscrappingxpath

### Embed Badge

![Health badge](/badges/opportus-web-scraper/health.svg)

```
[![Health](https://phpackages.com/badges/opportus-web-scraper/health.svg)](https://phpackages.com/packages/opportus-web-scraper)
```

###  Alternatives

[phpoffice/phpspreadsheet

PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine

13.9k293.5M1.3k](/packages/phpoffice-phpspreadsheet)[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[smalot/pdfparser

Pdf parser library. Can read and extract information from pdf file.

2.7k34.5M216](/packages/smalot-pdfparser)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.1k57.6M131](/packages/openspout-openspout)[keboola/csv

Keboola CSV reader and writer

1451.8M21](/packages/keboola-csv)

PHPackages © 2026

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