mslwk / otomoto-scrapper
PHP-CLI app for otomoto.pl scrapping
Requires
- php: ^7.2
- cocur/slugify: ^3.1
- fabpot/goutte: ^3.2
- psr/cache: ^1.0
- react/event-loop: ^0.4.3
- react/http-client: ^0.5.8
- symfony/console: ^4.0
- tedivm/stash: ^0.14.2
Requires (Dev)
- infection/infection: ^0.11.4
- php-coveralls/php-coveralls: ^2.0
- phpunit/phpunit: ^7.1
This package is auto-updated.
Last update: 2024-11-13 01:32:31 UTC
README
Otomoto scrapper
This CLI app scraps Otomoto to provide you with average price and mileage of a requested car.
Getting Started
These instructions will get you a copy of the project up and running on your local machine.
Prerequisites
You can use the provider Docker configuration to run the app. To do this you will need:
- docker
- docker-compose
Alternatively you can set it up using a locally installed PHP 7.2
Installing
- If you want to use Docker run
docker-compose up -d
Then, inside your container
composer install
Usage
The CLI application is available using the executable
bin/otomoto
Available commands
-
app:manufacturer-list - lists all available car manufacturers
bin/otomoto app:manufacturer-list
-
app:manufacturer-models manufacturer_name - lists all available models for chosen manufacturer
bin/otomoto app:manufacturer-models "Alfa Romeo"
-
app:model-details manufacturer_name model_name - retrieves stats for a chosen car model
bin/otomoto app:model-details "Alfa Romeo" "Giulia"
Available filters:
- From year of production
- To year of production
bin/otomoto app:model-details "Alfa Romeo" "Giulia" --from=2016 --to=2017
Caching
Models and manufacturers are cached inside cache/
directory. To clear cache
simply remove/empty the directory.
Built With
- Symfony Console
- Guzzle
- ReactPHP
- Stash caching
Authors
License
This project is licensed under the MIT License - see the LICENSE file for details