Giter Site home page Giter Site logo

spekulatius / spatie-crawler-cached-queue-example Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 0.0 667 KB

Example to demonstrate the usage of cached queues across multiple requests.

Home Page: https://releasecandidate.dev

Dockerfile 1.08% PHP 94.13% Blade 4.79%
laravel queues crawler crawler-engine spatie-crawler php-scraper php-crawler

spatie-crawler-cached-queue-example's Introduction

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:

  • The print out of the log file isn't live and updates only with reloading of the page.
  • The logging of the crawl actions is done separately as part of the crawler toolkit. This toolkit is a set of classes bringing Laravel and Spatie Crawler closer together. It's intended to simplify the development of crawler applications.
  • If your crawler doesn't crawl any more pages this might caused by having completed all discovered URLs. Try a different website to see if it works.

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

spatie-crawler-cached-queue-example's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.