recipe-scrapers
raw JSON → 15.11.0 verified Fri May 01 auth: no python
A Python package for scraping recipe data from hundreds of websites. Provides a unified interface to extract structured data such as ingredients, instructions, cook times, and nutrition. Requires Python >=3.10. Current version: 15.11.0. Active development with frequent releases every few weeks.
pip install recipe-scrapers Common errors
error AttributeError: module 'recipe_scrapers' has no attribute 'scrape_me' ↓
cause Importing the module name with a hyphen (recipe-scrapers) instead of the correct package name (recipe_scrapers).
fix
Change import to: from recipe_scrapers import scrape_me
error requests.exceptions.HTTPError: 403 Client Error ↓
cause Some websites block automated requests. The scraper does not handle this gracefully.
fix
Pass a custom headers dict to scrape_me: scrape_me(url, headers={'User-Agent': 'Mozilla/5.0'})
error ValueError: No recipe found at this URL ↓
cause The URL does not correspond to a recipe page or the scraper cannot parse it.
fix
Ensure the URL is from a supported source. Use wild_mode=True for generic parsing.
Warnings
breaking Python 3.9 dropped as of v15.11.0. Must use Python >=3.10. ↓
fix Upgrade Python to 3.10 or higher.
deprecated The method `total_time()` may be deprecated in favor of `cook_time()` and `prep_time()`. Check each scraper for support. ↓
fix Use `cook_time()` or `prep_time()` instead if available.
gotcha Not all websites are supported. Trying an unsupported URL raises an exception. Use `scrape_me(url, wild_mode=True)` to attempt generic scraping. ↓
fix Check the list of supported sites in the docs or pass `wild_mode=True` as fallback.
Imports
- scrape_me wrong
from recipe_scrapers.scraper import scrape_mecorrectfrom recipe_scrapers import scrape_me - AbstractScraper wrong
from recipe_scrapers.abstract import AbstractScrapercorrectfrom recipe_scrapers import AbstractScraper
Quickstart
from recipe_scrapers import scrape_me
url = 'https://www.allrecipes.com/recipe/12345/'
scraper = scrape_me(url)
print(scraper.title())
print(scraper.ingredients())
print(scraper.instructions())