PHPackages                             refactors/smart-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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. refactors/smart-scraper

AbandonedArchivedLibrary[Parsing &amp; Serialization](/categories/parsing)

refactors/smart-scraper
=======================

A smart PHP web scraper.

v0.0.8(10y ago)0372[1 issues](https://github.com/refactors/smart-scraper/issues)MITPHPPHP &gt;=5.6.0

Since May 19Pushed 10y agoCompare

[ Source](https://github.com/refactors/smart-scraper)[ Packagist](https://packagist.org/packages/refactors/smart-scraper)[ Docs](https://github.com/unknown-exceptions/smart-scrapper)[ RSS](/packages/refactors-smart-scraper/feed)WikiDiscussions master Synced 1mo ago

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

PHP Smart Scraper
=================

[](#php-smart-scraper)

[![Latest Stable Version](https://camo.githubusercontent.com/e744760029f9d216db792ccadecd328e4f70cceb6c2468bea9983991cb5866e3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7265666163746f72732f736d6172742d736372617065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/refactors/smart-scraper)[![Total Downloads](https://camo.githubusercontent.com/bf7649dbb99f91406c6c120b91576c35eb1535513d9a1e7bf266d32d8275967f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7265666163746f72732f736d6172742d736372617065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/refactors/smart-scraper)[![License](https://camo.githubusercontent.com/7c1e343664444efe295faadc097d35f12c3ac3cc8e0e4412638cdd54a3c48cb9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7265666163746f72732f736d6172742d736372617065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/refactors/smart-scraper)

Smart Scraper is a PHP scraper to scrape information from web pages. It can help you doing that horrible task in a very easy and smart way.

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

[](#installation)

Smart Scrapper needs PHP 5.6.0+ and you can use it via Composer:

`composer require refactores/smart-scraper`

Usage
-----

[](#usage)

Create a Smart Scraper instance:

```
$scraper = new SmartScraper\Parser($theUrlYouWantToScrape);
```

Then, if you want to save the text of some selector, you should use:

```
$scraper->saveText($name, $expression, [$attribute = null]);
```

The value is saved on `$scraper->{$name}`. Example:

```
$scraper->saveText( 'nick', '.header h1' );
echo $scraper->nick;
```

If you just want to receive the HTML you must use:

```
$scraper->saveHtml($name, $expression, [$index = 0]);
```

The `$index` referes to the position of the element in the page in the case of having more than one.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

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

8

Last Release

4013d ago

### Community

Maintainers

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

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

---

Top Contributors

[![hacdias](https://avatars.githubusercontent.com/u/5447088?v=4)](https://github.com/hacdias "hacdias (14 commits)")[![lsoares](https://avatars.githubusercontent.com/u/674045?v=4)](https://github.com/lsoares "lsoares (6 commits)")

---

Tags

parserscraper

### Embed Badge

![Health badge](/badges/refactors-smart-scraper/health.svg)

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

###  Alternatives

[nikic/php-parser

A PHP parser written in PHP

17.4k902.6M1.8k](/packages/nikic-php-parser)[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k910.8M118](/packages/doctrine-lexer)[erusev/parsedown

Parser for Markdown.

15.0k151.8M732](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

3.0k404.0M702](/packages/league-commonmark)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)

PHPackages © 2026

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