Download the PHP package ssnepenthe/recipe-scraper without Composer

On this page you can find all versions of the php package ssnepenthe/recipe-scraper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package recipe-scraper

recipe-scraper

A recipe scraping library which makes it easy to scrape recipes from popular sites around the web.

Current site support is still limited. A full list is available in SITE-SUPPORT.md.

Requirements

Composer, PHP 7.0 or later.

Installation

Usage

Scraper instances work on Symfony DomCrawler instances. These can be created however you choose, but the easiest is to use a BrowserKit implementation like Goutte:

If you only need to scrape recipes from a single site, you can use the corresponding class from src/Scrapers:

If you want to be able to scrape recipes from all supported sites, create a DelegatingScraper using the Factory class:

Check whether a scraper supports a given crawler using the ->supports() method:

Finally, scrape a recipe by passing the crawler to the ->scrape() method:

The following properties are guaranteed to be set on the $recipe array:

If the ->scrape() method is called on an unsupported crawler instance, all values in $recipe will be null.

Altogether:

OUTPUT:

Limitations

Scraping seems to be (unfortunately) the best option available for extracting structured recipes from the sites supported by this scraper.

Just keep in mind that any template updates to the target site have a very high chance of breaking this scraper.

If you notice support for a particular site is broken, please submit an issue or pull request.

For this same reason, it may be preferable to track the master branch of this repo, although I will try to tag a new release after any site-specific updates.


All versions of recipe-scraper with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
danielstjules/stringy Version ^2.0|^3.0
symfony/css-selector Version ^3.0|^4.0|^5.0
symfony/dom-crawler Version ^3.1|^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ssnepenthe/recipe-scraper contains the following files

Loading the files please wait ....