https://github.com/hhursev/recipe-scrapers
Python package for scraping recipes data
https://github.com/hhursev/recipe-scrapers
Last synced: 7 days ago
JSON representation
Python package for scraping recipes data
- Host: GitHub
- URL: https://github.com/hhursev/recipe-scrapers
- Owner: hhursev
- License: mit
- Created: 2015-09-14T12:05:00.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2025-03-30T18:47:12.000Z (16 days ago)
- Last Synced: 2025-04-01T21:11:21.149Z (14 days ago)
- Language: Python
- Homepage: https://docs.recipe-scrapers.com
- Size: 61.5 MB
- Stars: 1,858
- Watchers: 34
- Forks: 572
- Open Issues: 100
-
Metadata Files:
- Readme: README.rst
- Contributing: docs/contributing/code-contribution.md
- License: LICENSE
Awesome Lists containing this project
- starred - hhursev/recipe-scrapers - Python package for scraping recipes data (Python)
- awesome-starred - hhursev/recipe-scrapers - Python package for scraping recipes data (others)
README
=================
recipe-scrapers
=================.. image:: https://img.shields.io/github/stars/hhursev/recipe-scrapers?style=social
:target: https://github.com/hhursev/recipe-scrapers/
:alt: Github
.. image:: https://img.shields.io/pypi/v/recipe-scrapers.svg?
:target: https://pypi.org/project/recipe-scrapers/
:alt: Version
.. image:: https://img.shields.io/pypi/pyversions/recipe-scrapers
:target: https://pypi.org/project/recipe-scrapers/
:alt: PyPI - Python Version
.. image:: https://github.com/hhursev/recipe-scrapers/actions/workflows/unittests.yaml/badge.svg?branch=main
:target: unittests
:alt: GitHub Actions Unittests
.. image:: https://coveralls.io/repos/hhursev/recipe-scraper/badge.svg?branch=main&service=github
:target: https://coveralls.io/github/hhursev/recipe-scraper?branch=main
:alt: Coveralls
.. image:: https://img.shields.io/github/license/hhursev/recipe-scrapers?
:target: https://github.com/hhursev/recipe-scrapers/blob/main/LICENSE
:alt: LicenseQuick Links
-----------
- `Documentation `_
- `Supported Sites `_
- `Contributing Guide `_
- `Issue Tracker `_
- `Share Project Ideas `_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
------------
.. code:: shellpip install recipe-scrapers
Basic Usage
-----------
.. code:: pythonfrom 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:
.. code:: python
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:
.. code:: python
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!.. image:: https://contrib.rocks/image?repo=hhursev/recipe-scrapers
:target: https://github.com/hhursev/recipe-scrapers/graphs/contributorsShare Your Project
------------------
Have an idea for using recipe-scrapers? Check out
our `project ideas wall `_ for inspiration
or to share your own project!