=================
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://pepy.tech/badge/recipe-scrapers
:target: https://pepy.tech/project/recipe-scrapers
:alt: Downloads
.. 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: License
-------
A reliable python tool for scraping recipe data from popular cooking websites. Extract structured
recipe information including ingredients, instructions, cooking times, and nutritional data
with ease. Supports 400+ major recipe websites out of the box.
Quick Links
-----------
- `Documentation <https://docs.recipe-scrapers.com>`_
- `Supported Sites <https://docs.recipe-scrapers.com/getting-started/supported-sites/>`_
- `Contributing Guide <https://docs.recipe-scrapers.com/contributing/home/>`_
- `Issue Tracker <https://github.com/hhursev/recipe-scrapers/issues>`_
- `Share Project Ideas <https://github.com/hhursev/recipe-scrapers/issues/9>`_
Installing
----------
.. code:: shell
pip install recipe-scrapers
Basic Usage
-----------
.. code:: python
from urllib.request import urlopen
from recipe_scrapers import scrape_html
# Example recipe URL
url = "https://www.allrecipes.com/recipe/158968/spinach-and-feta-turkey-burgers/"
# retrieve the recipe webpage HTML
html = urlopen(url).read().decode("utf-8")
# pass the html alongside the url to our scrape_html function
scraper = scrape_html(html, org_url=url)
# Extract recipe information
print(scraper.title()) # "Spinach and Feta Turkey Burgers"
print(scraper.total_time()) # 35
print(scraper.yields()) # "4 servings"
print(scraper.ingredients()) # ['1 pound ground turkey', '1 cup fresh spinach...']
print(scraper.instructions()) # 'Step 1: In a large bowl...'
# For a complete list of available methods:
help(scraper)
HTTP Clients
------------
Some Python HTTP clients you can use to retrieve HTML include:
- `requests`_: Popular and feature-rich
- `httpx`_: Modern, supports async/await
- `urllib.request`_: Included in Python's standard library
Please refer to their documentation to find out what options (timeout configuration, proxy
support, etc) are available.
.. _requests: https://pypi.org/project/requests/
.. _httpx: https://pypi.org/project/httpx/
.. _urllib.request: https://docs.python.org/3/library/urllib.request.html
Supported Sites
---------------
We support a wide range of recipe websites out of the box. Check our
`supported sites list <https://docs.recipe-scrapers.com/getting-started/supported-sites/>`_
for the full list.
You can also get the full list programmatically with:
.. code:: python
from recipe_scrapers import SCRAPERS
SCRAPERS.keys()
Documentation
-------------
For detailed usage instructions, examples, and API reference, visit our
`documentation <https://docs.recipe-scrapers.com>`_.
Contributing
------------
We welcome contributions! Please read our
`contribution guide <https://docs.recipe-scrapers.com/contributing/home/>`_ to get started.
Special Thanks
--------------
To all the `contributors <https://github.com/hhursev/recipe-scrapers/graphs/contributors>`_ who
help make this project better!
.. image:: https://contrib.rocks/image?repo=hhursev/recipe-scrapers
:target: https://github.com/hhursev/recipe-scrapers/graphs/contributors
Share Your Project
------------------
Have an idea for using recipe-scrapers? Check out
our `project ideas wall <https://github.com/hhursev/recipe-scrapers/issues/9>`_ for inspiration
or to share your own project!
Raw data
{
"_id": null,
"home_page": null,
"name": "recipe-scrapers",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "James Addison <james@reciperadar.com>",
"keywords": "python, recipes, scraper, harvest, recipe-scraper, recipe-scrapers",
"author": null,
"author_email": "Hristo Harsev <r+pypi@hharsev.com>, James Addison <james@reciperadar.com>",
"download_url": "https://files.pythonhosted.org/packages/1b/3c/cc31f1c747deca21f8f110a50cc51c645c29552d99903df430f798cd13b8/recipe_scrapers-15.4.0.tar.gz",
"platform": null,
"description": "=================\nrecipe-scrapers\n=================\n\n.. image:: https://img.shields.io/github/stars/hhursev/recipe-scrapers?style=social\n :target: https://github.com/hhursev/recipe-scrapers/\n :alt: Github\n.. image:: https://img.shields.io/pypi/v/recipe-scrapers.svg?\n :target: https://pypi.org/project/recipe-scrapers/\n :alt: Version\n.. image:: https://img.shields.io/pypi/pyversions/recipe-scrapers\n :target: https://pypi.org/project/recipe-scrapers/\n :alt: PyPI - Python Version\n.. image:: https://pepy.tech/badge/recipe-scrapers\n :target: https://pepy.tech/project/recipe-scrapers\n :alt: Downloads\n.. image:: https://github.com/hhursev/recipe-scrapers/actions/workflows/unittests.yaml/badge.svg?branch=main\n :target: unittests\n :alt: GitHub Actions Unittests\n.. image:: https://coveralls.io/repos/hhursev/recipe-scraper/badge.svg?branch=main&service=github\n :target: https://coveralls.io/github/hhursev/recipe-scraper?branch=main\n :alt: Coveralls\n.. image:: https://img.shields.io/github/license/hhursev/recipe-scrapers?\n :target: https://github.com/hhursev/recipe-scrapers/blob/main/LICENSE\n :alt: License\n\n-------\n\nA reliable python tool for scraping recipe data from popular cooking websites. Extract structured\nrecipe information including ingredients, instructions, cooking times, and nutritional data\nwith ease. Supports 400+ major recipe websites out of the box.\n\n\nQuick Links\n-----------\n- `Documentation <https://docs.recipe-scrapers.com>`_\n- `Supported Sites <https://docs.recipe-scrapers.com/getting-started/supported-sites/>`_\n- `Contributing Guide <https://docs.recipe-scrapers.com/contributing/home/>`_\n- `Issue Tracker <https://github.com/hhursev/recipe-scrapers/issues>`_\n- `Share Project Ideas <https://github.com/hhursev/recipe-scrapers/issues/9>`_\n\n\nInstalling\n----------\n.. code:: shell\n\n pip install recipe-scrapers\n\n\nBasic Usage\n-----------\n.. code:: python\n\n from urllib.request import urlopen\n from recipe_scrapers import scrape_html\n\n # Example recipe URL\n url = \"https://www.allrecipes.com/recipe/158968/spinach-and-feta-turkey-burgers/\"\n # retrieve the recipe webpage HTML\n html = urlopen(url).read().decode(\"utf-8\")\n\n # pass the html alongside the url to our scrape_html function\n scraper = scrape_html(html, org_url=url)\n\n # Extract recipe information\n print(scraper.title()) # \"Spinach and Feta Turkey Burgers\"\n print(scraper.total_time()) # 35\n print(scraper.yields()) # \"4 servings\"\n print(scraper.ingredients()) # ['1 pound ground turkey', '1 cup fresh spinach...']\n print(scraper.instructions()) # 'Step 1: In a large bowl...'\n\n # For a complete list of available methods:\n help(scraper)\n\n\nHTTP Clients\n------------\nSome Python HTTP clients you can use to retrieve HTML include:\n\n- `requests`_: Popular and feature-rich\n- `httpx`_: Modern, supports async/await\n- `urllib.request`_: Included in Python's standard library\n\nPlease refer to their documentation to find out what options (timeout configuration, proxy\nsupport, etc) are available.\n\n.. _requests: https://pypi.org/project/requests/\n.. _httpx: https://pypi.org/project/httpx/\n.. _urllib.request: https://docs.python.org/3/library/urllib.request.html\n\n\nSupported Sites\n---------------\nWe support a wide range of recipe websites out of the box. Check our\n`supported sites list <https://docs.recipe-scrapers.com/getting-started/supported-sites/>`_\nfor the full list.\n\nYou can also get the full list programmatically with:\n\n.. code:: python\n\n from recipe_scrapers import SCRAPERS\n\n SCRAPERS.keys()\n\n\nDocumentation\n-------------\nFor detailed usage instructions, examples, and API reference, visit our\n`documentation <https://docs.recipe-scrapers.com>`_.\n\n\nContributing\n------------\nWe welcome contributions! Please read our\n`contribution guide <https://docs.recipe-scrapers.com/contributing/home/>`_ to get started.\n\n\nSpecial Thanks\n--------------\nTo all the `contributors <https://github.com/hhursev/recipe-scrapers/graphs/contributors>`_ who\nhelp make this project better!\n\n.. image:: https://contrib.rocks/image?repo=hhursev/recipe-scrapers\n :target: https://github.com/hhursev/recipe-scrapers/graphs/contributors\n\n\nShare Your Project\n------------------\nHave an idea for using recipe-scrapers? Check out\nour `project ideas wall <https://github.com/hhursev/recipe-scrapers/issues/9>`_ for inspiration\nor to share your own project!\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Python package, scraping recipes from all over the internet",
"version": "15.4.0",
"project_urls": {
"Homepage": "https://github.com/hhursev/recipe-scrapers/"
},
"split_keywords": [
"python",
" recipes",
" scraper",
" harvest",
" recipe-scraper",
" recipe-scrapers"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a2637b6047a2fb3e9cd217b384fc957fcb03525012dd47c6c783a6aa310cc8db",
"md5": "d042658ebe0e634947bde46b6a0975bc",
"sha256": "58d3d60e19d91f43c540496e942bfb4ca244e0de02fe2156edd552226477634f"
},
"downloads": -1,
"filename": "recipe_scrapers-15.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d042658ebe0e634947bde46b6a0975bc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 248188,
"upload_time": "2025-01-14T19:36:37",
"upload_time_iso_8601": "2025-01-14T19:36:37.417418Z",
"url": "https://files.pythonhosted.org/packages/a2/63/7b6047a2fb3e9cd217b384fc957fcb03525012dd47c6c783a6aa310cc8db/recipe_scrapers-15.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1b3ccc31f1c747deca21f8f110a50cc51c645c29552d99903df430f798cd13b8",
"md5": "4820e4ad64be6b8657683812409687d1",
"sha256": "1587016ce651d259bd51ef693277e7584720ce380ebea6a5bf526094f9fe99f7"
},
"downloads": -1,
"filename": "recipe_scrapers-15.4.0.tar.gz",
"has_sig": false,
"md5_digest": "4820e4ad64be6b8657683812409687d1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 116020,
"upload_time": "2025-01-14T19:36:40",
"upload_time_iso_8601": "2025-01-14T19:36:40.787283Z",
"url": "https://files.pythonhosted.org/packages/1b/3c/cc31f1c747deca21f8f110a50cc51c645c29552d99903df430f798cd13b8/recipe_scrapers-15.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-14 19:36:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hhursev",
"github_project": "recipe-scrapers",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "recipe-scrapers"
}