PHPackages                             marioungui/php-component-spider - 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. marioungui/php-component-spider

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

marioungui/php-component-spider
===============================

a PHP package for scraping Brands Websites

v0.7.3(1y ago)151[1 PRs](https://github.com/marioungui/PHP-Component-Spider/pulls)MITPHPPHP ^8.1.2CI passing

Since Feb 3Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/marioungui/PHP-Component-Spider)[ Packagist](https://packagist.org/packages/marioungui/php-component-spider)[ RSS](/packages/marioungui-php-component-spider/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (29)Used By (0)

PHP Component Spider
====================

[](#php-component-spider)

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT) [![CodeFactor](https://camo.githubusercontent.com/1561f582cc2e11eac0eca0111e0f5bd2b9cb4ab780d3349e103086d376537459/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f6d6172696f756e6775692f7068702d636f6d706f6e656e742d7370696465722f6261646765)](https://www.codefactor.io/repository/github/marioungui/php-component-spider) [![Latest Stable Version](https://camo.githubusercontent.com/0061104eddee9e837e019ebe83ff4d532a8e4f38fc0e8c3dac4ed14eb8c8ac9e/68747470733a2f2f706f7365722e707567782e6f72672f6d6172696f756e6775692f7068702d636f6d706f6e656e742d7370696465722f76)](https://packagist.org/packages/marioungui/php-component-spider) [![License](https://camo.githubusercontent.com/34c4681e3ed9bd81a1ad8246c86bd96c20bb3531ec067384e199b5d5e96c276c/68747470733a2f2f706f7365722e707567782e6f72672f6d6172696f756e6775692f7068702d636f6d706f6e656e742d7370696465722f6c6963656e7365)](https://packagist.org/packages/marioungui/php-component-spider) [![PHAR Build](https://github.com/marioungui/PHP-Component-Spider/actions/workflows/php.yml/badge.svg)](https://github.com/marioungui/PHP-Component-Spider/actions/workflows/php.yml)

This PHP Component Spider is designed to scrape websites for specific components or search criteria defined by XPath filters. It uses the PHPScraper library to fetch and process web pages, and the League\\Csv library to log the results in CSV files. This tool is easy to extend with custom XPath filters to meet various scraping needs.

Features
--------

[](#features)

- Scrape websites for specific components or text based on XPath filters.
- Log results into CSV files for further analysis.
- Configurable timeout and maximum redirects.
- Easy to extend with additional filters.

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

[](#requirements)

- PHP 8.1 or higher
- Composer

Build &amp; Run from Source Code
--------------------------------

[](#build--run-from-source-code)

1. Clone the repository:

```
git clone https://github.com/marioungui/PHP-Component-Spider.git
```

2. Navigate to the project directory:

```
cd PHP-Component-Spider
```

3. Install the dependencies using Composer:

```
composer install
```

4. Build the Phar package:

```
php -d phar.readonly=0 phar-creator.php
```

5. Run the batch spider.bat
6. Follow the on-screen instructions to select the component to search for and the domain to scrape.

Filters
-------

[](#filters)

The filters are defined in filters.php and use XPath to identify specific components on the web pages. Here are the current filters available:

ComponentIndexFilterMVP Block1`//*[@class='mvp-block']`Smart Question Search Engine Block2`//*[@class='sqe-block']`Related Articles Block3`//h2[text()='Artigos relacionados' or text()='Artigos Relacionados' or text()='Articulos Relacionados' or text()='Articulos relacionados' ]`Related Products Block4`//h2[text()='Produtos Relacionados' or text()='Produtos Relacionados' or text()='Productos relacionados' or text()='Productos Relacionados']`Brands Block5`//*[starts-with(@id, 'brands_block')]/@id`Stages Block6`//*[starts-with(@id, 'stages_block')]`String Search7`//*[contains(text(),'word')]`Action Bar8`//div[contains(@class, 'action-bar__wrapper')]`Links Containing9`//a[contains(@href, 'word')]`Stages Block using From Library10`//div[contains(@class, 'paragraph--type--stages-block')]//div[contains(@class, 'grid-col-10')]`Extending with Custom Filters
-----------------------------

[](#extending-with-custom-filters)

Extending the tool with new filters is simple:

1. Open the `filters.php` file.
2. Add a new `case` in the `switch` statement with your component name or index.
3. Define the `$component` and `$filter` variables with your custom XPath.

Example:

```
case 'new-component':
case 11:
    $component = "New Component";
    $filter = "//*[@class='new-component-class']";
    break;
```

Contributing
------------

[](#contributing)

Feel free to submit issues or pull requests if you have any improvements or new features you'd like to add.

License
-------

[](#license)

This project is licensed under the MIT License.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance56

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.6% 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 ~26 days

Recently: every ~39 days

Total

27

Last Release

510d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a356e4dc0cbe1113c66d90786fb6f50ece7bdb6ce2ade0606c5b9803816d5d4?d=identicon)[marioungui](/maintainers/marioungui)

---

Top Contributors

[![marioungui](https://avatars.githubusercontent.com/u/40603707?v=4)](https://github.com/marioungui "marioungui (85 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")

### Embed Badge

![Health badge](/badges/marioungui-php-component-spider/health.svg)

```
[![Health](https://phpackages.com/badges/marioungui-php-component-spider/health.svg)](https://phpackages.com/packages/marioungui-php-component-spider)
```

###  Alternatives

[symfony/ux-cropperjs

Cropper.js integration for Symfony

19280.3k3](/packages/symfony-ux-cropperjs)[leapt/core-bundle

Symfony LeaptCoreBundle

2529.1k4](/packages/leapt-core-bundle)[symfony/ux-notify

Native notification integration for Symfony

1274.7k](/packages/symfony-ux-notify)[numero2/contao-storelocator

Contao Plugin for managing stores (or in common address data) and providing a frontend-search based on geo data

121.5k](/packages/numero2-contao-storelocator)

PHPackages © 2026

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