Skip to content

spekulatius/faasd-phpscraper

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

PHP Scraper as a Function

A simple OpenFaaS/faasd wrapper around PHP Scraper. Essentially turning your scraper into a function.

Usage

  1. Fork and clone the fork.
  2. Adjust the stack.yml file with your docker hub name.
  3. Change the handler to your needs.
  4. faas-cli up --gateway http://faasd.somewhere.com:8080.

How to generate the secret?

  1. Create a secret:

    echo $(head -c 16 /dev/urandom | shasum | cut -d "-" -f1) > token.txt
  2. Store it on the server:

    faas-cli secret create phpscraper-token --from-file token.txt --gateway http://yourfaasd.somewhere.com:8080
  3. Deploy as usual:

    faas-cli up --gateway http://yourfaasd.somewhere.com:8080

How to develop with PHPScraper?

For more information on core functionality of PHPScraper check the documentation. The tests and examples can also help understanding it better.