Skip to main content

recipe-database-scraper is a simple Python package that gathers all recipes from a website in order to maintain a database.


Usage

from recipe-database-scraper import scrape_site

Example usage

Simple usage:

from recipe-database-scraper import scrape_site

url = "https://barefeetinthekitchen.com/"
user_agent = "Hungry Scraper " + <myname>

data = scrape_site(url, user_agent)

Working with files:

from recipe-database-scraper import scrape_site, extract_domain

url = "https://barefeetinthekitchen.com/"
user_agent = "Hungry Scraper " + <myname>
input_file = extract_domain(url) + ".json"
output_file = extract_domain(url) + "_new.json"

data = scrape_site(url, user_agent, input_file = input_file, output_file = output_file, batch_size = 100)

Output

recipe-database-scraper currently only creates simple json dictionaries.


Every key is a webpage url scraped from the sitemap, that contains Recipe Schema Markup. With the exception of the last key - "Pages without Recipe" - which contains a list of all urls that do not contain Recipe Schema Markup


Example output of website with 1 recipe page and 4 pages in total:

{"https://example.com/recipes/something_yummy": {"author": "Itsame Mario", "canonical_url":"https://example.com/recipes/something_yummy","category":"yummy", "description": "Yummy food", "host": "example.com", "image": "https://example.com/yummy-default.jpg", "ingredient_groups": [{"ingredients": ["yummyness"], "purpose": null}], "ingredients": ["yummyness"], "instructions": "Cook the food", "instructions_list": ["Step 1", "Prepare", "Step 2", "Cook"], "language": "en-Uk", "nutrients": {}, "prep_time": null, "site_name": "Example", "title": "Yummy Food", "total_time": null, "yields": 1, "last_modified": "2024-12-31T59:59:59+00:00"},"Pages Without Recipe":["https://example.com", "https://example.com/recipes", "https://example.com/blog"]}

Acknowledgments

This package rests on the shoulders of recipe-scrapers and ultimate-sitemap-parser.


Thanks to recipe-scrapers, this scraper can be used for scraping any website that contains recipe data. The recipe-scrapers package also offers a massive list of websites with supported scrapers for more accurate schema markup recognition. If the url you want to scrape is not on that list, please help out by suggesting the site name, as well as a recipe link to it in a New issue on recipe-scrapers

Metadata

Release files for recipe-database-scraper 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for recipe-database-scraper 0.2.0
File Size Uploaded Provenance Actions
recipe_database_scraper-0.2.0.tar.gz 12.0 kB Without provenance Details for recipe_database_scraper-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for recipe-database-scraper 0.2.0
File Interpreter ABI Platform Actions
recipe_database_scraper-0.2.0-py3-none-any.whl Python 3 none any Details for recipe_database_scraper-0.2.0-py3-none-any.whl

Total release size: 25.3 kB

Release files / recipe_database_scraper-0.2.0.tar.gz

Download URL recipe_database_scraper-0.2.0.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
26c77d45fec7799e0e96780d7ecf96f21c86e1ac394d8c8603087ed8a8a3a758
BLAKE2b-256 checksum
How to use checksums
0bbdc92116887616a0ba13530c714ee894ab8533d87b4f2ebe1c3aa671f381dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.3 Windows/11

Release files / recipe_database_scraper-0.2.0-py3-none-any.whl

Download URL recipe_database_scraper-0.2.0-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64d3932fe2b8f1ca51b600d266ec9500f96998aca0eba45330e34eb901f6f663
BLAKE2b-256 checksum
How to use checksums
9fbc369384f4fc65d0ecb870a5869dd8beb946488e145c7a079df93c95dbee04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.3 Windows/11

Security for recipe-database-scraper 0.2.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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page