recipe-scrapers
Quick Links
A Python package for extracting recipe data from cooking websites. Parses recipe information from either standard HTML structure, Schema markup (including JSON-LD, Microdata, and RDFa formats) or OpenGraph metadata.
The package provides a simple and consistent API for retrieving data such as ingredients, instructions, cooking times, and more.
Compatible with the Python versions listed above. This package does not circumvent or bypass any bot protection measures implemented by websites.
Installation
pip install recipe-scrapers
Basic Usage
from recipe_scrapers import scrape_me
scraper = scrape_me("https://www.allrecipes.com/recipe/158968/spinach-and-feta-turkey-burgers/")
scraper.title()
scraper.instructions()
scraper.to_json()
# for a complete list of methods:
# help(scraper)
This package is focused exclusively on HTML parsing.
For advanced implementations, you’ll need to implement your own solution for fetching recipe HTMLs and managing network requests. The library works best when you provide both the HTML content and its source domain.
You are encouraged to use our scrape_html method:
from recipe_scrapers import scrape_html
Higher-quality image detection is enabled by default when multiple options are available on a page. If you prefer to keep the first image returned by the site, disable the behaviour on a per-call basis or via the global setting:
scraper = scrape_html(html, url, best_image=False)
image_url = scraper.image()
from recipe_scrapers.settings import settings
settings.BEST_IMAGE_SELECTION = False
Supported Sites
We support a wide range of recipe websites out of the box. Check our supported sites list for the full list.
You can also get the full list programmatically with:
from recipe_scrapers import SCRAPERS
SCRAPERS.keys()
Contributing
We welcome contributions! Please read our contribution guide to get started.
Special Thanks
To all the contributors who help make this project better!
Metadata
Release files for recipe-scrapers-gregbiv-fork 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| recipe_scrapers_gregbiv_fork-0.1.0.tar.gz | 141.2 kB | Without provenance | Details for recipe_scrapers_gregbiv_fork-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| recipe_scrapers_gregbiv_fork-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for recipe_scrapers_gregbiv_fork-0.1.0-py3-none-any.whl |
Total release size: 442.1 kB
Release files / recipe_scrapers_gregbiv_fork-0.1.0.tar.gz
| Download URL | recipe_scrapers_gregbiv_fork-0.1.0.tar.gz |
|---|---|
| Size | 141.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a98fca3d9044667dd0d96e5b0c457201a876c110b70a37c007fde8002dc94b8c
|
|
BLAKE2b-256 checksum How to use checksums |
b0c266433e5286a6eb408fd9bbada1e1b0cbd3c038e9bf1c85376a7e53ae9ce7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / recipe_scrapers_gregbiv_fork-0.1.0-py3-none-any.whl
| Download URL | recipe_scrapers_gregbiv_fork-0.1.0-py3-none-any.whl |
|---|---|
| Size | 300.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d181c071fa32927cfe363cbd278e78eab00b789ac022f9b37abe358b4eec9a4a
|
|
BLAKE2b-256 checksum How to use checksums |
0f749733bc6c7e224984986aaed366a1a1ba98c294af96b10fbdaeef04008455
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for recipe-scrapers-gregbiv-fork 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.