Python package, scraping recipes from all over the internet
Project description
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
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!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file recipe_scrapers-15.8.0.tar.gz
.
File metadata
- Download URL: recipe_scrapers-15.8.0.tar.gz
- Upload date:
- Size: 126.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
938d0510b88809fa181e49d95498bbc40db40d8d973637b3f7b77da837bcda12
|
|
MD5 |
399bbbba647279194b9d00abb31c7a03
|
|
BLAKE2b-256 |
8eb653d0406138afc144795625ab0f0e94605178bc5503994e780a145e218a77
|
Provenance
The following attestation bundles were made for recipe_scrapers-15.8.0.tar.gz
:
Publisher:
publish.yaml
on hhursev/recipe-scrapers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
recipe_scrapers-15.8.0.tar.gz
-
Subject digest:
938d0510b88809fa181e49d95498bbc40db40d8d973637b3f7b77da837bcda12
- Sigstore transparency entry: 229165614
- Sigstore integration time:
-
Permalink:
hhursev/recipe-scrapers@07b1666b2f1a3adaa21099e9a2b910c4ad9e6333
-
Branch / Tag:
refs/tags/15.8.0
- Owner: https://github.com/hhursev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
publish.yaml@07b1666b2f1a3adaa21099e9a2b910c4ad9e6333
-
Trigger Event:
release
-
Statement type:
File details
Details for the file recipe_scrapers-15.8.0-py3-none-any.whl
.
File metadata
- Download URL: recipe_scrapers-15.8.0-py3-none-any.whl
- Upload date:
- Size: 271.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
65015802f3d6e60493b9a9de4737c0aa42eb67c6d2ced43a1f32ffaf4fb9c48e
|
|
MD5 |
cf3fdf2ff686be862e61dca7e09aeeba
|
|
BLAKE2b-256 |
4378b26dc5671fb79b534e164ce4b851a8813a65a081230a6133b0cecc308fdd
|
Provenance
The following attestation bundles were made for recipe_scrapers-15.8.0-py3-none-any.whl
:
Publisher:
publish.yaml
on hhursev/recipe-scrapers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
recipe_scrapers-15.8.0-py3-none-any.whl
-
Subject digest:
65015802f3d6e60493b9a9de4737c0aa42eb67c6d2ced43a1f32ffaf4fb9c48e
- Sigstore transparency entry: 229165617
- Sigstore integration time:
-
Permalink:
hhursev/recipe-scrapers@07b1666b2f1a3adaa21099e9a2b910c4ad9e6333
-
Branch / Tag:
refs/tags/15.8.0
- Owner: https://github.com/hhursev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
publish.yaml@07b1666b2f1a3adaa21099e9a2b910c4ad9e6333
-
Trigger Event:
release
-
Statement type: