Simple project to scrape sainsbury's shopping cart items and return data as JSON.
Clone this repository and cd
into it. Then run composer install
in order to download dependencies.
"guzzlehttp/guzzle": "~6.0",
"corneltek/getoptionkit": "~2"
"phpspec/phpspec": "~2.0"
Execute make test
which will execute all available Test specs.
To scrape shopping cart (http://hiring-tests.s3-website-eu-west-1.amazonaws.com/2015_Developer_Scrape/5_products.html) - Execute make run
alternatively you can execute following command,
php scrapper.php --url="http://hiring-tests.s3-website-eu-west-1.amazonaws.com/2015_Developer_Scrape/5_products.html"
Run make
in order see available CLi options for scraper.php