#Installation Run the following commands to get the app installed and running.
git clone git@github.com:tochix/fruit-scraper.git
- From the cloned app directory
composer install
To run the command line scraper, issue the command
./yii scraper
There's an acceptance test case included. You can run it by:
cd tests/codeception
../../vendor/bin/codecept bootstrap
../../vendor/bin/codecept run acceptance tests/acceptance/ScraperCept.php
fruit-scraper was implemented using the Yii2 PHP framework. The web page scraper was built as a component which uses pre-defined config to state items of interest for scraping. The component is loaded in the console's config file, making it available at application start and usable from command line. A test case was written to test the end to end functionality of the scraper.
This implementation has a dependency on Goutte (used for web scraping) and Codeception (used for the test cases).