Skip to content

tochix/fruit-scraper

Repository files navigation

#Installation Run the following commands to get the app installed and running.

  • git clone [email protected]:tochix/fruit-scraper.git
  • From the cloned app directory composer install

Usage

To run the command line scraper, issue the command ./yii scraper

Acceptance Test

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

Implementation

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).

About

PHP cli for scraping items from a web page

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages