joanne / scrapping-php
1.0.0
2023-07-05 18:48 UTC
Requires
- php: >=8.0
- symfony/css-selector: ^6.0
- symfony/dom-crawler: ^6.0
- symfony/http-client: ^6.0
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.6
README
This project is a PHP scraping application that retrieves data from a website using the DomCrawler component of Symfony.
We retrieve the following information from the website https://www.planete-sonic.com/univers/personnages/personnages-des-jeux/:
- Character name
- Character image
- Character description
Prerequisites
- PHP 8.0 or later
Installation
- Clone the repository:
git clone
- Install the dependencies:
composer install
Usage of Symfony Components
This project uses the following Symfony components:
- DomCrawler
- HttpClient
- CssSelector
These components provide powerful functionalities for web scraping, allowing you to navigate through HTML and extract desired data.
Tests
To perform static code analysis, use PHPStan:
php vendor/bin/phpstan analyze src --level=max
To run unit tests, use PHPUnit:
php vendor/bin/phpunit tests
Contributors
- Joanne Massillon @joannemas
Licence
This project is licensed under the MIT License.