Awesome
spatie-crawler-queue-with-laravel-model
Spatie's Crawler with Laravel Model as Queue
This is just a laravel application 8.x with a model class, a queue class, a migration class and a command class to use Spatie's Crawler package.
Why this is better than others spatie/crawler queues packages?
The main reason is the others queues packages store all items in one single array, which can be a RAM problem for big sites. Furthermore, you can preserve and use crawled links as you want
To expire items we use mvdnbrk/laravel-model-expires
Processed items are marked as soft-deleted
Steps
- Clone the repo
- Run
composer install
- Run
php artisan migration
(after configuredatabase.php
) - Adjust
app/Console/Commands/CrawlerRun.php
- Run
php artisan craw https://site_or_blog.com
Main files to take a look: