Home

Awesome

Spatie Crawler Example for Cached Queue-Driver

This is an example of how a Crawler queue-driver can be cached and reused later. As an example it's rather simple and only intended to demonstrate core functionality. This is not intended to be used as a project. It could be integrated nicely with PHP Scraper.

The example is intended to be used with Docker as an locally-build image. The following commands build and run the crawler example:

docker build -t crawler-example -f ./Dockerfile .
docker run -p 8080:80 --rm crawler-example

After this, you can access it under localhost:8080. The main page of the example has an input field for the URL (ensure to have https:// at the start!). With a click on 'Crawl' the crawler processes the first five pages of the provided URL. Below you see the laravel.log printed out to see the actions completed.

Please note:

This project is purely to demonstrate the functionality and shouldn't be used as it is. Please don't host this anywhere!