Download the PHP package cable8mm/mma-scrapers without Composer
On this page you can find all versions of the php package cable8mm/mma-scrapers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cable8mm/mma-scrapers
More information about cable8mm/mma-scrapers
Files in cable8mm/mma-scrapers
Package mma-scrapers
Short Description A lightweight, extensible PHP library for scraping MMA data from multiple sources.
License MIT
Informations about the package mma-scrapers
MMA Scrapers
A lightweight PHP library for scraping and parsing MMA data into simple DTOs.
Features
- Source-specific scrapers and parsers for MMA websites.
- Normalized DTOs for events, fights, and fighters.
- Fixture-friendly parser design using Symfony DomCrawler.
- Mockable HTTP layer through
HttpClientInterface. - Helper services for fighter matching, Sherdog ID resolution, and fight deduplication.
- No database dependency.
Requirements
- PHP
^8.4 - Composer
Installation
For local development:
Supported Sources
| Source | Events | Event detail | Fights | Fighters | Notes |
|---|---|---|---|---|---|
| BlackCombat | Yes | Yes | Yes | Yes | Official source support |
| Sherdog | No | No | No | Yes | Fighter search and fighter detail support |
| Tapology | No | No | No | No | Planned source |
Core Concepts
The library is organized around a small pipeline:
Scrapers fetch HTML and delegate extraction to parsers. Parsers are deterministic and return DTOs. Aggregators and services are available when a consuming app needs to compare, merge, or deduplicate parsed results.
Project Structure
Usage
Parse BlackCombat Events From HTML
Scrape BlackCombat Events
Parse BlackCombat Fights
Scrape a Sherdog Fighter
Resolve a Sherdog Fighter ID
Deduplicate Fights
DTOs
EventDTO
FighterDTO
FightDTO
Design Rules
- Keep source implementations isolated under
src/Sources/{SourceName}. - Put HTTP access in scrapers, not parsers.
- Keep parsers deterministic: raw HTML in, DTOs out.
- Test parsers with static HTML fixtures.
- Keep storage, API delivery, and application workflows outside this package.
Development
Run tests:
Run Pint:
Generate API documentation:
Testing
Parser and scraper tests use HTML fixtures from tests/Fixtures.
Avoid real HTTP calls in tests. Inject a mocked HttpClientInterface when testing scrapers.
Contributing
- Keep the existing source/parser/scraper boundaries.
- Add or update fixtures for parser changes.
- Add unit tests for new behavior.
- Run
composer testandcomposer lintbefore opening a pull request.
License
MMA Scrapers is open-sourced software licensed under the MIT license.
All versions of mma-scrapers with dependencies
guzzlehttp/guzzle Version ^7.10
symfony/dom-crawler Version ^8.0
symfony/css-selector Version ^8.0