.. 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://pepy.tech/badge/recipe-scrapers
:target: https://pepy.tech/project/recipe-scrapers
:alt: Downloads
.. image:: https://github.com/hhursev/recipe-scrapers/workflows/unittests/badge.svg?branch=main
:target: https://github.com/hhursev/recipe-scrapers/actions/
: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
.. image:: https://github.com/hhursev/recipe-scrapers/workflows/linters/badge.svg?branch=main
:target: https://github.com/hhursev/recipe-scrapers/actions/
:alt: GitHub Actions Linters
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Black formatted
.. image:: https://img.shields.io/lgtm/grade/python/g/hhursev/recipe-scrapers.svg?logo=lgtm&logoWidth=18
:target: https://lgtm.com/projects/g/hhursev/recipe-scrapers/context:python
:alt: Looks Good To Me
------
A simple web scraping tool for recipe sites.
.. code:: shell
pip install recipe-scrapers
then:
.. code:: python
from recipe_scrapers import scrape_me
# give the url as a string, it can be url from any site listed below
scraper = scrape_me('https://www.allrecipes.com/recipe/158968/spinach-and-feta-turkey-burgers/')
# Q: What if the recipe site I want to extract information from is not listed below?
# A: You can give it a try with the wild_mode option! If there is Schema/Recipe available it will work just fine.
scraper = scrape_me('https://www.feastingathome.com/tomato-risotto/', wild_mode=True)
scraper.title()
scraper.total_time()
scraper.yields()
scraper.ingredients()
scraper.instructions() # or alternatively for results as a Python list: scraper.instructions_list()
scraper.image()
scraper.host()
scraper.links()
scraper.nutrients() # if available
# Starting from version 14.0.0 you also have an option to scrape from html-like content
import requests
from recipe_scrapers import scrape_html
url = "https://www.allrecipes.com/recipe/158968/spinach-and-feta-turkey-burgers/"
html = requests.get(url).content
scraper = scrape_html(html=html, org_url=url)
scraper.title()
scraper.total_time()
# etc...
Notes:
- ``scraper.links()`` returns a list of dictionaries containing all of the <a> tag attributes. The attribute names are the dictionary keys.
Scrapers available for:
-----------------------
- `https://claudia.abril.com.br/ <https://claudia.abril.com.br>`_
- `https://www.acouplecooks.com <https://acouplecooks.com/>`_
- `http://www.afghankitchenrecipes.com/ <http://www.afghankitchenrecipes.com/>`_
- `https://akispetretzikis.com/ <https://akispetretzikis.com/>`_
- `https://ah.nl/ <https://ah.nl/>`_
- `https://allrecipes.com/ <https://allrecipes.com/>`_
- `https://alltommat.se/ <https://alltommat.se/>`_
- `https://altonbrown.com/ <https://altonbrown.com/>`_
- `https://amazingribs.com/ <https://amazingribs.com/>`_
- `https://ambitiouskitchen.com/ <https://ambitiouskitchen.com>`_
- `https://archanaskitchen.com/ <https://archanaskitchen.com/>`_
- `https://www.arla.se/ <https://www.arla.se/>`_
- `https://www.atelierdeschefs.fr/ <https://www.atelierdeschefs.fr/>`_
- `https://averiecooks.com/ <https://www.averiecooks.com/>`_
- `https://baking-sense.com/ <https://baking-sense.com/>`_
- `https://bakingmischief.com/ <https://bakingmischief.com/>`_
- `https://bbc.com/ <https://bbc.com/food/recipes>`_
- `https://bbc.co.uk/ <http://bbc.co.uk/food/recipes>`_
- `https://bbcgoodfood.com/ <https://bbcgoodfood.com>`_
- `https://bettybossi.ch/ <https://bettybossi.ch>`_
- `https://bettycrocker.com/ <https://bettycrocker.com>`_
- `https://bigoven.com/ <https://bigoven.com>`_
- `https://blueapron.com/ <https://blueapron.com>`_
- `https://bonappetit.com/ <https://bonappetit.com>`_
- `https://www.bodybuilding.com/ <https://www.bodybuilding.com/>`_
- `https://bowlofdelicious.com/ <https://bowlofdelicious.com/>`_
- `https://budgetbytes.com/ <https://budgetbytes.com>`_
- `https://castironketo.net/ <https://castironketo.net/>`_
- `https://cdkitchen.com/ <https://cdkitchen.com/>`_
- `https://chefkoch.de/ <https://chefkoch.de>`_
- `https://closetcooking.com/ <https://closetcooking.com>`_
- `https://comidinhasdochef.com/ <https://comidinhasdochef.com/>`_
- `https://cookeatshare.com/ <https://cookeatshare.com/>`_
- `https://cookieandkate.com/ <https://cookieandkate.com/>`_
- `https://cookingcircle.com/ <https://cookingcircle.com/>`_
- `https://cookinglight.com/ <https://cookinglight.com/>`_
- `https://cookpad.com/ <https://cookpad.com/>`_
- `https://cookstr.com/ <https://cookstr.com>`_
- `https://www.coop.se/ <https://www.coop.se/>`_
- `https://copykat.com/ <https://copykat.com>`_
- `https://countryliving.com/ <https://countryliving.com>`_
- `https://creativecanning.com/ <https://creativecanning.com>`_
- `https://cucchiaio.it/ <https://cucchiaio.it>`_
- `https://cuisineaz.com/ <https://cuisineaz.com>`_
- `https://cybercook.com.br/ <https://cybercook.com.br/>`_
- `https://www.davidlebovitz.com/ <https://www.davidlebovitz.com/>`_
- `https://delish.com/ <https://delish.com>`_
- `https://www.ditchthecarbs.com/ <https://www.ditchthecarbs.com>`_
- `https://domesticate-me.com/ <https://domesticate-me.com/>`_
- `https://downshiftology.com/ <https://downshiftology.com/>`_
- `https://www.dr.dk/ <https://www.dr.dk/>`_
- `https://www.eatingbirdfood.com/ <https://www.eatingbirdfood.com>`_
- `https://www.eatingwell.com/ <https://www.eatingwell.com>`_
- `https://eatsmarter.com/ <https://eatsmarter.com/>`_
- `https://eatsmarter.de/ <https://eatsmarter.de/>`_
- `https://eatwhattonight.com/ <https://eatwhattonight.com/>`_
- `https://emmikochteinfach.de/ <https://emmikochteinfach.de/>`_
- `https://ethanchlebowski.com/ <https://ethanchlebowski.com>`_
- `https://epicurious.com/ <https://epicurious.com>`_
- `https://recipes.farmhousedelivery.com/ <https://recipes.farmhousedelivery.com/>`_
- `https://fifteenspatulas.com/ <https://www.fifteenspatulas.com/>`_
- `https://finedininglovers.com/ <https://www.finedininglovers.com>`_
- `https://fitmencook.com/ <https://www.fitmencook.com>`_
- `https://food.com/ <https://www.food.com>`_
- `https://food52.com/ <https://www.food52.com>`_
- `https://foodandwine.com/ <https://www.foodandwine.com>`_
- `https://foodnetwork.com/ <https://www.foodnetwork.com>`_
- `https://foodrepublic.com/ <https://foodrepublic.com>`_
- `https://www.forksoverknives.com/ <https://www.forksoverknives.com/>`_
- `https://fredriksfika.allas.se/ <https://fredriksfika.allas.se/>`_
- `https://www.750g.com <https://www.750g.com>`_
- `https://geniuskitchen.com/ <https://geniuskitchen.com>`_
- `https://giallozafferano.it/ <https://giallozafferano.it>`_
- `https://gimmesomeoven.com/ <https://www.gimmesomeoven.com/>`_
- `https://recietas.globo.com/ <https://www.receitas.globo.com/>`_
- `https://gonnawantseconds.com/ <https://gonnawantseconds.com>`_
- `https://gousto.co.uk/ <https://gousto.co.uk>`_
- `https://greatbritishchefs.com/ <https://greatbritishchefs.com>`_
- `https://halfbakedharvest.com/ <https://www.halfbakedharvest.com/>`_
- `https://handletheheat.com/ <https://handletheheat.com/>`_
- `https://www.hassanchef.com/ <https://www.hassanchef.com/>`_
- `https://headbangerskitchen.com/ <https://www.headbangerskitchen.com/>`_
- `https://www.heb.com/ <https://www.heb.com/recipe/landing>`_
- `https://heinzbrasil.com.br/ <https://heinzbrasil.com.br>`_
- `https://hellofresh.com/ <https://hellofresh.com>`_
- `https://hellofresh.co.uk/ <https://hellofresh.co.uk>`_
- `https://www.hellofresh.de/ <https://www.hellofresh.de/>`_
- `https://www.hellofresh.fr/ <https://www.hellofresh.fr/>`_
- `https://www.hellofresh.nl/ <https://www.hellofresh.nl/>`_
- `https://www.homechef.com/ <https://www.homechef.com/>`_
- `https://hostthetoast.com/ <https://hostthetoast.com/>`_
- `https://www.ica.se/ <https://www.ica.se/>`_
- `https://receitas.ig.com.br/ <https://receitas.ig.com.br>`_
- `https://www.im-worthy.com/ <https://www.im-worthy.com>`_
- `https://indianhealthyrecipes.com <https://www.indianhealthyrecipes.com>`_
- `https://www.innit.com/ <https://www.innit.com/>`_
- `https://inspiralized.com/ <https://inspiralized.com>`_
- `https://jamieoliver.com/ <https://jamieoliver.com>`_
- `https://jimcooksfoodgood.com/ <https://jimcooksfoodgood.com/>`_
- `https://joyfoodsunshine.com/ <https://joyfoodsunshine.com>`_
- `https://justataste.com/ <https://justataste.com>`_
- `https://justbento.com/ <https://justbento.com>`_
- `https://www.justonecookbook.com/ <https://https://www.justonecookbook.com>`_
- `https://kennymcgovern.com/ <https://kennymcgovern.com>`_
- `https://www.kingarthurbaking.com <https://www.kingarthurbaking.com>`_
- `https://www.kitchenstories.com/ <https://www.kitchenstories.com>`_
- `https://kochbar.de/ <https://kochbar.de>`_
- `http://koket.se/ <http://koket.se>`_
- `https://www.kptncook.com/ <https://www.kptncook.com>`_
- `https://kuchnia-domowa.pl/ <https://www.kuchnia-domowa.pl/>`_
- `https://www.kwestiasmaku.com/ <https://www.kwestiasmaku.com/>`_
- `https://www.latelierderoxane.com <https://www.latelierderoxane.com/blog/recettes/>`_
- `https://leanandgreenrecipes.net <https://leanandgreenrecipes.net>`_
- `https://lecremedelacrumb.com/ <https://lecremedelacrumb.com/>`_
- `https://www.lecker.de <https://www.lecker.de/rezepte>`_
- `https://lekkerensimpel.com <https://lekkerensimpel.com>`_
- `https://littlespicejar.com/ <https://littlespicejar.com>`_
- `http://livelytable.com/ <http://livelytable.com/>`_
- `https://lovingitvegan.com/ <https://lovingitvegan.com/>`_
- `https://www.maangchi.com <https://www.maangchi.com>`_
- `https://madensverden.dk/ <https://madensverden.dk/>`_
- `https://www.madewithlau.com/ <https://www.madewithlau.com/>`_
- `https://marleyspoon.com.au/ <https://marleyspoon.com.au/>`_
- `https://marleyspoon.com/ <https://marleyspoon.com/>`_
- `https://marleyspoon.de/ <https://marleyspoon.de/>`_
- `https://marleyspoon.at/ <https://marleyspoon.at/>`_
- `https://marleyspoon.be/ <https://marleyspoon.be/>`_
- `https://marleyspoon.nl/ <https://marleyspoon.nl/>`_
- `https://marleyspoon.se/ <https://marleyspoon.se/>`_
- `https://marmiton.org/ <https://marmiton.org/>`_
- `https://www.marthastewart.com/ <https://www.marthastewart.com/>`_
- `https://matprat.no/ <https://matprat.no/>`_
- `https://meljoulwan.com/ <https://meljoulwan.com/>`_
- `https://www.melskitchencafe.com/ <https://www.melskitchencafe.com/>`_
- `http://mindmegette.hu/ <http://mindmegette.hu/>`_
- `https://minimalistbaker.com/ <https://minimalistbaker.com/>`_
- `https://misya.info/ <https://misya.info>`_
- `https://www.mobkitchen.co.uk/ <https://www.mobkitchen.co.uk/>`_
- `https://momswithcrockpots.com/ <https://momswithcrockpots.com>`_
- `https://monsieur-cuisine.com/ <https://monsieur-cuisine.com>`_
- `http://motherthyme.com/ <http://motherthyme.com/>`_
- `https://mybakingaddiction.com/ <https://mybakingaddiction.com>`_
- `https://mykitchen101.com/ <https://mykitchen101.com>`_
- `https://mykitchen101en.com/ <https://mykitchen101en.com>`_
- `https://www.myplate.gov/ <https://www.myplate.gov/>`_
- `https://myrecipes.com/ <https://myrecipes.com>`_
- `https://healthyeating.nhlbi.nih.gov/ <https://healthyeating.nhlbi.nih.gov>`_
- `https://nourishedbynutrition.com/ <https://nourishedbynutrition.com/>`_
- `https://nutritionbynathalie.com/blog <https://nutritionbynathalie.com/blog>`_
- `https://cooking.nytimes.com/ <https://cooking.nytimes.com>`_
- `https://ohsheglows.com/ <https://ohsheglows.com>`_
- `https://omnivorescookbook.com <https://omnivorescookbook.com>`_
- `https://owen-han.com/ <https://owen-han.com>`_
- `https://101cookbooks.com/ <https://101cookbooks.com/>`_
- `https://www.paleorunningmomma.com/ <https://www.paleorunningmomma.com>`_
- `https://www.panelinha.com.br/ <https://www.panelinha.com.br>`_
- `https://paninihappy.com/ <https://paninihappy.com>`_
- `https://https://www.pingodoce.pt/ <https://www.pingodoce.pt>`_
- `https://popsugar.com/ <https://popsugar.com>`_
- `https://practicalselfreliance.com/ <https://practicalselfreliance.com>`_
- `https://www.primaledgehealth.com/ <https://www.primaledgehealth.com/>`_
- `https://przepisy.pl/ <https://przepisy.pl>`_
- `https://purelypope.com/ <https://purelypope.com>`_
- `https://purplecarrot.com/ <https://purplecarrot.com>`_
- `https://rachlmansfield.com/ <https://rachlmansfield.com>`_
- `https://rainbowplantlife.com/ <https://rainbowplantlife.com/>`_
- `https://realfood.tesco.com/ <https://realfood.tesco.com>`_
- `https://realsimple.com/ <https://www.realsimple.com>`_
- `https://recipetineats.com/ <https://www.recipetineats.com/>`_
- `https://redhousespice.com/ <https://redhousespice.com/>`_
- `https://reishunger.de/ <https://www.reishunger.de/>`_
- `https://rezeptwelt.de/ <https://rezeptwelt.de>`_
- `https://rosannapansino.com <https://rosannapansino.com>`_
- `https://sallysbakingaddiction.com <https://sallysbakingaddiction.com/>`_
- `https://www.saveur.com/ <https://www.saveur.com/>`_
- `https://seriouseats.com/ <https://seriouseats.com>`_
- `https://simple-veganista.com/ <https://simple-veganista.com/>`_
- `https://simplyquinoa.com/ <https://simplyquinoa.com>`_
- `https://simplyrecipes.com/ <https://simplyrecipes.co>`_
- `https://simplywhisked.com/ <https://simplywhisked.com>`_
- `https://simply-cookit.com/ <https://simply-cookit.com>`_
- `https://skinnytaste.com/ <https://www.skinnytaste.com>`_
- `https://www.southerncastiron.com/ <https://www.southerncastiron.com>`_
- `https://southernliving.com/ <https://southernliving.com/>`_
- `https://spendwithpennies.com/ <https://spendwithpennies.com/>`_
- `https://www.springlane.de <https://www.springlane.de>`_
- `https://steamykitchen.com/ <https://steamykitchen.com>`_
- `https://streetkitchen.hu/ <https://streetkitchen.hu>`_
- `https://sunbasket.com/ <https://sunbasket.com>`_
- `https://sundpaabudget.dk/ <https://sundpaabudget.dk>`_
- `https://sweetcsdesigns.com/ <https://www.sweetcsdesigns.com/>`_
- `https://sweetpeasandsaffron.com/ <https://sweetpeasandsaffron.com/>`_
- `https://tasteofhome.com <https://tasteofhome.com>`_
- `https://tastesbetterfromscratch.com <https://tastesbetterfromscratch.com>`_
- `https://tastesoflizzyt.com <https://tastesoflizzyt.com>`_
- `https://tasty.co <https://tasty.co>`_
- `https://tastykitchen.com/ <https://tastykitchen.com>`_
- `https://theclevercarrot.com/ <https://theclevercarrot.com>`_
- `https://thehappyfoodie.co.uk/ <https://thehappyfoodie.co.uk>`_
- `https://www.thekitchenmagpie.com/ <https://www.thekitchenmagpie.com>`_
- `https://thekitchn.com/ <https://thekitchn.com/>`_
- `https://thenutritiouskitchen.co/ <https://thenutritiouskitchen.co/>`_
- `https://thepioneerwoman.com/ <https://thepioneerwoman.com>`_
- `https://thespruceeats.com/ <https://thespruceeats.com/>`_
- `https://thevintagemixer.com/ <https://thevintagemixer.com>`_
- `https://thewoksoflife.com/ <https://thewoksoflife.com/>`_
- `https://timesofindia.com/ <https://timesofindia.com/>`_
- `https://tine.no/ <https://tine.no>`_
- `https://tudogostoso.com.br/ <https://www.tudogostoso.com.br/>`_
- `https://twopeasandtheirpod.com/ <http://twopeasandtheirpod.com>`_
- `https://www.valdemarsro.dk/ <https://www.valdemarsro.dk/>`_
- `https://vanillaandbean.com/ <https://vanillaandbean.com>`_
- `https://vegolosi.it/ <https://vegolosi.it>`_
- `https://vegrecipesofindia.com/ <https://www.vegrecipesofindia.com/>`_
- `https://watchwhatueat.com/ <https://watchwhatueat.com/>`_
- `https://www.weightwatchers.com/ <https://www.weightwatchers.com/>`_ (*)
- `https://whatsgabycooking.com/ <https://whatsgabycooking.com>`_
- `https://www.wholefoodsmarket.com/ <https://www.wholefoodsmarket.com/>`_
- `https://www.wholefoodsmarket.co.uk/ <https://www.wholefoodsmarket.co.uk/>`_
- `https://woop.co.nz/ <https://woop.co.nz/>`_
- `https://woolworths.com.au/shop/recipes <https://www.woolworths.com.au/shop/recipes/>`_
- `https://en.wikibooks.org/ <https://en.wikibooks.org>`_
- `https://yemek.com/ <https://yemek.com>`_
- `https://yummly.com/ <https://yummly.com>`_
- `https://zeit.de/ (wochenmarkt) <https://www.zeit.de/zeit-magazin/wochenmarkt/index>`_
- `https://zenbelly.com/ <https://zenbelly.com>`_
(*) offline saved files only
Contribute
----------
If you spot a design change (or something else) that makes the scraper unable to work for a given site - please fire an issue asap.
If you are programmer PRs with fixes are warmly welcomed and acknowledged with a virtual beer.
If you want a scraper for a new site added
------------------------------------------
- Open an `Issue <https://github.com/hhursev/recipe-scraper/issues/new>`_ providing us the site name, as well as a recipe link from it.
- You are a developer and want to code the scraper on your own:
- If `Schema is available <#faq>`_ on the site - `you can go like this. <https://github.com/hhursev/recipe-scrapers/pull/176>`_
- Otherwise, scrape the HTML - `like this <https://github.com/hhursev/recipe-scrapers/commit/ffee963d04>`_
- Generating a new scraper class:
.. code:: shell
python generate.py <ClassName> <URL>
- **ClassName**: The name of the new scraper class.
- **URL**: The URL of an example recipe from the target site. The content will be stored in `test_data` to be used with the test class.
For Devs / Contribute
---------------------
Assuming you have ``>=python3.7`` installed, navigate to the directory where you want this project to live in and drop these lines
.. code:: shell
git clone git@github.com:hhursev/recipe-scrapers.git &&
cd recipe-scrapers &&
python3 -m venv .venv &&
source .venv/bin/activate &&
pip install -r requirements-dev.txt &&
python -m pip install --upgrade build twine
python -m unittest
python -m build
python -m twine upload --repository pypi dist/*
In case you want to run a single unittest for a newly developed scraper
.. code:: shell
python -m unittest tests.test_myscraper
FAQ
---
- **How do I know if a website has a Recipe Schema?** Run in python shell:
.. code:: python
from recipe_scrapers import scrape_me
scraper = scrape_me('<url of a recipe from the site>', wild_mode=True)
# if no error is raised - there's schema available:
scraper.title()
scraper.instructions() # etc.
Netiquette
----------
If you're using this library to collect large numbers of recipes from the web, please use the software responsibly and try to avoid creating high volumes of network traffic.
Python's standard library provides a ``robots.txt`` `parser <https://docs.python.org/3/library/urllib.robotparser.html>`_ that may be helpful to automatically follow common instructions specified by websites for web crawlers.
Another parser option -- particularly if you find that many web requests from ``urllib.robotparser`` are blocked -- is the `robotsexclusionparser <https://pypi.org/project/robotexclusionrulesparser/>`_ library.
Special thanks to:
------------------
All the `contributors that helped improving <https://github.com/hhursev/recipe-scrapers/graphs/contributors>`_ the package. You are awesome!
Raw data
{
"_id": null,
"home_page": "",
"name": "recipe-scrapers-ap-fork",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "python,recipes,scraper,harvest,recipe-scraper,recipe-scrapers",
"author": "",
"author_email": "Hristo Harsev <r+pypi@hharsev.com>",
"download_url": "https://files.pythonhosted.org/packages/2b/56/8c4746bfb799ce1157577f1997b8017e71302731c435cb3ca672542379c8/recipe_scrapers_ap_fork-14.24.7.tar.gz",
"platform": null,
"description": ".. 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://pepy.tech/badge/recipe-scrapers\n :target: https://pepy.tech/project/recipe-scrapers\n :alt: Downloads\n.. image:: https://github.com/hhursev/recipe-scrapers/workflows/unittests/badge.svg?branch=main\n :target: https://github.com/hhursev/recipe-scrapers/actions/\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.. image:: https://github.com/hhursev/recipe-scrapers/workflows/linters/badge.svg?branch=main\n :target: https://github.com/hhursev/recipe-scrapers/actions/\n :alt: GitHub Actions Linters\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Black formatted\n.. image:: https://img.shields.io/lgtm/grade/python/g/hhursev/recipe-scrapers.svg?logo=lgtm&logoWidth=18\n :target: https://lgtm.com/projects/g/hhursev/recipe-scrapers/context:python\n :alt: Looks Good To Me\n\n\n------\n\n\nA simple web scraping tool for recipe sites.\n\n.. code:: shell\n\n pip install recipe-scrapers\n\nthen:\n\n.. code:: python\n\n from recipe_scrapers import scrape_me\n\n # give the url as a string, it can be url from any site listed below\n scraper = scrape_me('https://www.allrecipes.com/recipe/158968/spinach-and-feta-turkey-burgers/')\n\n # Q: What if the recipe site I want to extract information from is not listed below?\n # A: You can give it a try with the wild_mode option! If there is Schema/Recipe available it will work just fine.\n scraper = scrape_me('https://www.feastingathome.com/tomato-risotto/', wild_mode=True)\n\n scraper.title()\n scraper.total_time()\n scraper.yields()\n scraper.ingredients()\n scraper.instructions() # or alternatively for results as a Python list: scraper.instructions_list()\n scraper.image()\n scraper.host()\n scraper.links()\n scraper.nutrients() # if available\n\n # Starting from version 14.0.0 you also have an option to scrape from html-like content\n import requests\n from recipe_scrapers import scrape_html\n\n url = \"https://www.allrecipes.com/recipe/158968/spinach-and-feta-turkey-burgers/\"\n html = requests.get(url).content\n\n scraper = scrape_html(html=html, org_url=url)\n\n scraper.title()\n scraper.total_time()\n # etc...\n\n\nNotes:\n\n- ``scraper.links()`` returns a list of dictionaries containing all of the <a> tag attributes. The attribute names are the dictionary keys.\n\n\nScrapers available for:\n-----------------------\n\n- `https://claudia.abril.com.br/ <https://claudia.abril.com.br>`_\n- `https://www.acouplecooks.com <https://acouplecooks.com/>`_\n- `http://www.afghankitchenrecipes.com/ <http://www.afghankitchenrecipes.com/>`_\n- `https://akispetretzikis.com/ <https://akispetretzikis.com/>`_\n- `https://ah.nl/ <https://ah.nl/>`_\n- `https://allrecipes.com/ <https://allrecipes.com/>`_\n- `https://alltommat.se/ <https://alltommat.se/>`_\n- `https://altonbrown.com/ <https://altonbrown.com/>`_\n- `https://amazingribs.com/ <https://amazingribs.com/>`_\n- `https://ambitiouskitchen.com/ <https://ambitiouskitchen.com>`_\n- `https://archanaskitchen.com/ <https://archanaskitchen.com/>`_\n- `https://www.arla.se/ <https://www.arla.se/>`_\n- `https://www.atelierdeschefs.fr/ <https://www.atelierdeschefs.fr/>`_\n- `https://averiecooks.com/ <https://www.averiecooks.com/>`_\n- `https://baking-sense.com/ <https://baking-sense.com/>`_\n- `https://bakingmischief.com/ <https://bakingmischief.com/>`_\n- `https://bbc.com/ <https://bbc.com/food/recipes>`_\n- `https://bbc.co.uk/ <http://bbc.co.uk/food/recipes>`_\n- `https://bbcgoodfood.com/ <https://bbcgoodfood.com>`_\n- `https://bettybossi.ch/ <https://bettybossi.ch>`_\n- `https://bettycrocker.com/ <https://bettycrocker.com>`_\n- `https://bigoven.com/ <https://bigoven.com>`_\n- `https://blueapron.com/ <https://blueapron.com>`_\n- `https://bonappetit.com/ <https://bonappetit.com>`_\n- `https://www.bodybuilding.com/ <https://www.bodybuilding.com/>`_\n- `https://bowlofdelicious.com/ <https://bowlofdelicious.com/>`_\n- `https://budgetbytes.com/ <https://budgetbytes.com>`_\n- `https://castironketo.net/ <https://castironketo.net/>`_\n- `https://cdkitchen.com/ <https://cdkitchen.com/>`_\n- `https://chefkoch.de/ <https://chefkoch.de>`_\n- `https://closetcooking.com/ <https://closetcooking.com>`_\n- `https://comidinhasdochef.com/ <https://comidinhasdochef.com/>`_\n- `https://cookeatshare.com/ <https://cookeatshare.com/>`_\n- `https://cookieandkate.com/ <https://cookieandkate.com/>`_\n- `https://cookingcircle.com/ <https://cookingcircle.com/>`_\n- `https://cookinglight.com/ <https://cookinglight.com/>`_\n- `https://cookpad.com/ <https://cookpad.com/>`_\n- `https://cookstr.com/ <https://cookstr.com>`_\n- `https://www.coop.se/ <https://www.coop.se/>`_\n- `https://copykat.com/ <https://copykat.com>`_\n- `https://countryliving.com/ <https://countryliving.com>`_\n- `https://creativecanning.com/ <https://creativecanning.com>`_\n- `https://cucchiaio.it/ <https://cucchiaio.it>`_\n- `https://cuisineaz.com/ <https://cuisineaz.com>`_\n- `https://cybercook.com.br/ <https://cybercook.com.br/>`_\n- `https://www.davidlebovitz.com/ <https://www.davidlebovitz.com/>`_\n- `https://delish.com/ <https://delish.com>`_\n- `https://www.ditchthecarbs.com/ <https://www.ditchthecarbs.com>`_\n- `https://domesticate-me.com/ <https://domesticate-me.com/>`_\n- `https://downshiftology.com/ <https://downshiftology.com/>`_\n- `https://www.dr.dk/ <https://www.dr.dk/>`_\n- `https://www.eatingbirdfood.com/ <https://www.eatingbirdfood.com>`_\n- `https://www.eatingwell.com/ <https://www.eatingwell.com>`_\n- `https://eatsmarter.com/ <https://eatsmarter.com/>`_\n- `https://eatsmarter.de/ <https://eatsmarter.de/>`_\n- `https://eatwhattonight.com/ <https://eatwhattonight.com/>`_\n- `https://emmikochteinfach.de/ <https://emmikochteinfach.de/>`_\n- `https://ethanchlebowski.com/ <https://ethanchlebowski.com>`_\n- `https://epicurious.com/ <https://epicurious.com>`_\n- `https://recipes.farmhousedelivery.com/ <https://recipes.farmhousedelivery.com/>`_\n- `https://fifteenspatulas.com/ <https://www.fifteenspatulas.com/>`_\n- `https://finedininglovers.com/ <https://www.finedininglovers.com>`_\n- `https://fitmencook.com/ <https://www.fitmencook.com>`_\n- `https://food.com/ <https://www.food.com>`_\n- `https://food52.com/ <https://www.food52.com>`_\n- `https://foodandwine.com/ <https://www.foodandwine.com>`_\n- `https://foodnetwork.com/ <https://www.foodnetwork.com>`_\n- `https://foodrepublic.com/ <https://foodrepublic.com>`_\n- `https://www.forksoverknives.com/ <https://www.forksoverknives.com/>`_\n- `https://fredriksfika.allas.se/ <https://fredriksfika.allas.se/>`_\n- `https://www.750g.com <https://www.750g.com>`_\n- `https://geniuskitchen.com/ <https://geniuskitchen.com>`_\n- `https://giallozafferano.it/ <https://giallozafferano.it>`_\n- `https://gimmesomeoven.com/ <https://www.gimmesomeoven.com/>`_\n- `https://recietas.globo.com/ <https://www.receitas.globo.com/>`_\n- `https://gonnawantseconds.com/ <https://gonnawantseconds.com>`_\n- `https://gousto.co.uk/ <https://gousto.co.uk>`_\n- `https://greatbritishchefs.com/ <https://greatbritishchefs.com>`_\n- `https://halfbakedharvest.com/ <https://www.halfbakedharvest.com/>`_\n- `https://handletheheat.com/ <https://handletheheat.com/>`_\n- `https://www.hassanchef.com/ <https://www.hassanchef.com/>`_\n- `https://headbangerskitchen.com/ <https://www.headbangerskitchen.com/>`_\n- `https://www.heb.com/ <https://www.heb.com/recipe/landing>`_\n- `https://heinzbrasil.com.br/ <https://heinzbrasil.com.br>`_\n- `https://hellofresh.com/ <https://hellofresh.com>`_\n- `https://hellofresh.co.uk/ <https://hellofresh.co.uk>`_\n- `https://www.hellofresh.de/ <https://www.hellofresh.de/>`_\n- `https://www.hellofresh.fr/ <https://www.hellofresh.fr/>`_\n- `https://www.hellofresh.nl/ <https://www.hellofresh.nl/>`_\n- `https://www.homechef.com/ <https://www.homechef.com/>`_\n- `https://hostthetoast.com/ <https://hostthetoast.com/>`_\n- `https://www.ica.se/ <https://www.ica.se/>`_\n- `https://receitas.ig.com.br/ <https://receitas.ig.com.br>`_\n- `https://www.im-worthy.com/ <https://www.im-worthy.com>`_\n- `https://indianhealthyrecipes.com <https://www.indianhealthyrecipes.com>`_\n- `https://www.innit.com/ <https://www.innit.com/>`_\n- `https://inspiralized.com/ <https://inspiralized.com>`_\n- `https://jamieoliver.com/ <https://jamieoliver.com>`_\n- `https://jimcooksfoodgood.com/ <https://jimcooksfoodgood.com/>`_\n- `https://joyfoodsunshine.com/ <https://joyfoodsunshine.com>`_\n- `https://justataste.com/ <https://justataste.com>`_\n- `https://justbento.com/ <https://justbento.com>`_\n- `https://www.justonecookbook.com/ <https://https://www.justonecookbook.com>`_\n- `https://kennymcgovern.com/ <https://kennymcgovern.com>`_\n- `https://www.kingarthurbaking.com <https://www.kingarthurbaking.com>`_\n- `https://www.kitchenstories.com/ <https://www.kitchenstories.com>`_\n- `https://kochbar.de/ <https://kochbar.de>`_\n- `http://koket.se/ <http://koket.se>`_\n- `https://www.kptncook.com/ <https://www.kptncook.com>`_\n- `https://kuchnia-domowa.pl/ <https://www.kuchnia-domowa.pl/>`_\n- `https://www.kwestiasmaku.com/ <https://www.kwestiasmaku.com/>`_\n- `https://www.latelierderoxane.com <https://www.latelierderoxane.com/blog/recettes/>`_\n- `https://leanandgreenrecipes.net <https://leanandgreenrecipes.net>`_\n- `https://lecremedelacrumb.com/ <https://lecremedelacrumb.com/>`_\n- `https://www.lecker.de <https://www.lecker.de/rezepte>`_\n- `https://lekkerensimpel.com <https://lekkerensimpel.com>`_\n- `https://littlespicejar.com/ <https://littlespicejar.com>`_\n- `http://livelytable.com/ <http://livelytable.com/>`_\n- `https://lovingitvegan.com/ <https://lovingitvegan.com/>`_\n- `https://www.maangchi.com <https://www.maangchi.com>`_\n- `https://madensverden.dk/ <https://madensverden.dk/>`_\n- `https://www.madewithlau.com/ <https://www.madewithlau.com/>`_\n- `https://marleyspoon.com.au/ <https://marleyspoon.com.au/>`_\n- `https://marleyspoon.com/ <https://marleyspoon.com/>`_\n- `https://marleyspoon.de/ <https://marleyspoon.de/>`_\n- `https://marleyspoon.at/ <https://marleyspoon.at/>`_\n- `https://marleyspoon.be/ <https://marleyspoon.be/>`_\n- `https://marleyspoon.nl/ <https://marleyspoon.nl/>`_\n- `https://marleyspoon.se/ <https://marleyspoon.se/>`_\n- `https://marmiton.org/ <https://marmiton.org/>`_\n- `https://www.marthastewart.com/ <https://www.marthastewart.com/>`_\n- `https://matprat.no/ <https://matprat.no/>`_\n- `https://meljoulwan.com/ <https://meljoulwan.com/>`_\n- `https://www.melskitchencafe.com/ <https://www.melskitchencafe.com/>`_\n- `http://mindmegette.hu/ <http://mindmegette.hu/>`_\n- `https://minimalistbaker.com/ <https://minimalistbaker.com/>`_\n- `https://misya.info/ <https://misya.info>`_\n- `https://www.mobkitchen.co.uk/ <https://www.mobkitchen.co.uk/>`_\n- `https://momswithcrockpots.com/ <https://momswithcrockpots.com>`_\n- `https://monsieur-cuisine.com/ <https://monsieur-cuisine.com>`_\n- `http://motherthyme.com/ <http://motherthyme.com/>`_\n- `https://mybakingaddiction.com/ <https://mybakingaddiction.com>`_\n- `https://mykitchen101.com/ <https://mykitchen101.com>`_\n- `https://mykitchen101en.com/ <https://mykitchen101en.com>`_\n- `https://www.myplate.gov/ <https://www.myplate.gov/>`_\n- `https://myrecipes.com/ <https://myrecipes.com>`_\n- `https://healthyeating.nhlbi.nih.gov/ <https://healthyeating.nhlbi.nih.gov>`_\n- `https://nourishedbynutrition.com/ <https://nourishedbynutrition.com/>`_\n- `https://nutritionbynathalie.com/blog <https://nutritionbynathalie.com/blog>`_\n- `https://cooking.nytimes.com/ <https://cooking.nytimes.com>`_\n- `https://ohsheglows.com/ <https://ohsheglows.com>`_\n- `https://omnivorescookbook.com <https://omnivorescookbook.com>`_\n- `https://owen-han.com/ <https://owen-han.com>`_\n- `https://101cookbooks.com/ <https://101cookbooks.com/>`_\n- `https://www.paleorunningmomma.com/ <https://www.paleorunningmomma.com>`_\n- `https://www.panelinha.com.br/ <https://www.panelinha.com.br>`_\n- `https://paninihappy.com/ <https://paninihappy.com>`_\n- `https://https://www.pingodoce.pt/ <https://www.pingodoce.pt>`_\n- `https://popsugar.com/ <https://popsugar.com>`_\n- `https://practicalselfreliance.com/ <https://practicalselfreliance.com>`_\n- `https://www.primaledgehealth.com/ <https://www.primaledgehealth.com/>`_\n- `https://przepisy.pl/ <https://przepisy.pl>`_\n- `https://purelypope.com/ <https://purelypope.com>`_\n- `https://purplecarrot.com/ <https://purplecarrot.com>`_\n- `https://rachlmansfield.com/ <https://rachlmansfield.com>`_\n- `https://rainbowplantlife.com/ <https://rainbowplantlife.com/>`_\n- `https://realfood.tesco.com/ <https://realfood.tesco.com>`_\n- `https://realsimple.com/ <https://www.realsimple.com>`_\n- `https://recipetineats.com/ <https://www.recipetineats.com/>`_\n- `https://redhousespice.com/ <https://redhousespice.com/>`_\n- `https://reishunger.de/ <https://www.reishunger.de/>`_\n- `https://rezeptwelt.de/ <https://rezeptwelt.de>`_\n- `https://rosannapansino.com <https://rosannapansino.com>`_\n- `https://sallysbakingaddiction.com <https://sallysbakingaddiction.com/>`_\n- `https://www.saveur.com/ <https://www.saveur.com/>`_\n- `https://seriouseats.com/ <https://seriouseats.com>`_\n- `https://simple-veganista.com/ <https://simple-veganista.com/>`_\n- `https://simplyquinoa.com/ <https://simplyquinoa.com>`_\n- `https://simplyrecipes.com/ <https://simplyrecipes.co>`_\n- `https://simplywhisked.com/ <https://simplywhisked.com>`_\n- `https://simply-cookit.com/ <https://simply-cookit.com>`_\n- `https://skinnytaste.com/ <https://www.skinnytaste.com>`_\n- `https://www.southerncastiron.com/ <https://www.southerncastiron.com>`_\n- `https://southernliving.com/ <https://southernliving.com/>`_\n- `https://spendwithpennies.com/ <https://spendwithpennies.com/>`_\n- `https://www.springlane.de <https://www.springlane.de>`_\n- `https://steamykitchen.com/ <https://steamykitchen.com>`_\n- `https://streetkitchen.hu/ <https://streetkitchen.hu>`_\n- `https://sunbasket.com/ <https://sunbasket.com>`_\n- `https://sundpaabudget.dk/ <https://sundpaabudget.dk>`_\n- `https://sweetcsdesigns.com/ <https://www.sweetcsdesigns.com/>`_\n- `https://sweetpeasandsaffron.com/ <https://sweetpeasandsaffron.com/>`_\n- `https://tasteofhome.com <https://tasteofhome.com>`_\n- `https://tastesbetterfromscratch.com <https://tastesbetterfromscratch.com>`_\n- `https://tastesoflizzyt.com <https://tastesoflizzyt.com>`_\n- `https://tasty.co <https://tasty.co>`_\n- `https://tastykitchen.com/ <https://tastykitchen.com>`_\n- `https://theclevercarrot.com/ <https://theclevercarrot.com>`_\n- `https://thehappyfoodie.co.uk/ <https://thehappyfoodie.co.uk>`_\n- `https://www.thekitchenmagpie.com/ <https://www.thekitchenmagpie.com>`_\n- `https://thekitchn.com/ <https://thekitchn.com/>`_\n- `https://thenutritiouskitchen.co/ <https://thenutritiouskitchen.co/>`_\n- `https://thepioneerwoman.com/ <https://thepioneerwoman.com>`_\n- `https://thespruceeats.com/ <https://thespruceeats.com/>`_\n- `https://thevintagemixer.com/ <https://thevintagemixer.com>`_\n- `https://thewoksoflife.com/ <https://thewoksoflife.com/>`_\n- `https://timesofindia.com/ <https://timesofindia.com/>`_\n- `https://tine.no/ <https://tine.no>`_\n- `https://tudogostoso.com.br/ <https://www.tudogostoso.com.br/>`_\n- `https://twopeasandtheirpod.com/ <http://twopeasandtheirpod.com>`_\n- `https://www.valdemarsro.dk/ <https://www.valdemarsro.dk/>`_\n- `https://vanillaandbean.com/ <https://vanillaandbean.com>`_\n- `https://vegolosi.it/ <https://vegolosi.it>`_\n- `https://vegrecipesofindia.com/ <https://www.vegrecipesofindia.com/>`_\n- `https://watchwhatueat.com/ <https://watchwhatueat.com/>`_\n- `https://www.weightwatchers.com/ <https://www.weightwatchers.com/>`_ (*)\n- `https://whatsgabycooking.com/ <https://whatsgabycooking.com>`_\n- `https://www.wholefoodsmarket.com/ <https://www.wholefoodsmarket.com/>`_\n- `https://www.wholefoodsmarket.co.uk/ <https://www.wholefoodsmarket.co.uk/>`_\n- `https://woop.co.nz/ <https://woop.co.nz/>`_\n- `https://woolworths.com.au/shop/recipes <https://www.woolworths.com.au/shop/recipes/>`_\n- `https://en.wikibooks.org/ <https://en.wikibooks.org>`_\n- `https://yemek.com/ <https://yemek.com>`_\n- `https://yummly.com/ <https://yummly.com>`_\n- `https://zeit.de/ (wochenmarkt) <https://www.zeit.de/zeit-magazin/wochenmarkt/index>`_\n- `https://zenbelly.com/ <https://zenbelly.com>`_\n\n(*) offline saved files only\n\nContribute\n----------\n\nIf you spot a design change (or something else) that makes the scraper unable to work for a given site - please fire an issue asap.\n\nIf you are programmer PRs with fixes are warmly welcomed and acknowledged with a virtual beer.\n\n\nIf you want a scraper for a new site added\n------------------------------------------\n\n- Open an `Issue <https://github.com/hhursev/recipe-scraper/issues/new>`_ providing us the site name, as well as a recipe link from it.\n- You are a developer and want to code the scraper on your own:\n\n - If `Schema is available <#faq>`_ on the site - `you can go like this. <https://github.com/hhursev/recipe-scrapers/pull/176>`_\n - Otherwise, scrape the HTML - `like this <https://github.com/hhursev/recipe-scrapers/commit/ffee963d04>`_\n - Generating a new scraper class:\n\n .. code:: shell\n\n python generate.py <ClassName> <URL>\n\n - **ClassName**: The name of the new scraper class.\n - **URL**: The URL of an example recipe from the target site. The content will be stored in `test_data` to be used with the test class.\n\nFor Devs / Contribute\n---------------------\n\nAssuming you have ``>=python3.7`` installed, navigate to the directory where you want this project to live in and drop these lines\n\n.. code:: shell\n\n git clone git@github.com:hhursev/recipe-scrapers.git &&\n cd recipe-scrapers &&\n python3 -m venv .venv &&\n source .venv/bin/activate &&\n pip install -r requirements-dev.txt &&\n python -m pip install --upgrade build twine\n python -m unittest\n\n python -m build\n python -m twine upload --repository pypi dist/*\n\nIn case you want to run a single unittest for a newly developed scraper\n\n.. code:: shell\n\n python -m unittest tests.test_myscraper\n\nFAQ\n---\n- **How do I know if a website has a Recipe Schema?** Run in python shell:\n\n.. code:: python\n\n from recipe_scrapers import scrape_me\n scraper = scrape_me('<url of a recipe from the site>', wild_mode=True)\n # if no error is raised - there's schema available:\n scraper.title()\n scraper.instructions() # etc.\n\nNetiquette\n----------\n\nIf you're using this library to collect large numbers of recipes from the web, please use the software responsibly and try to avoid creating high volumes of network traffic.\n\nPython's standard library provides a ``robots.txt`` `parser <https://docs.python.org/3/library/urllib.robotparser.html>`_ that may be helpful to automatically follow common instructions specified by websites for web crawlers.\n\nAnother parser option -- particularly if you find that many web requests from ``urllib.robotparser`` are blocked -- is the `robotsexclusionparser <https://pypi.org/project/robotexclusionrulesparser/>`_ library.\n\n\nSpecial thanks to:\n------------------\n\nAll the `contributors that helped improving <https://github.com/hhursev/recipe-scrapers/graphs/contributors>`_ the package. You are awesome!\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Python package, scraping recipes from all over the internet",
"version": "14.24.7",
"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": "281d4f949c9ce4120964b86e1d350907911c550c9f2df810aa23795d19eb888c",
"md5": "27a268452739e3d121cfe3d3fa1ce25f",
"sha256": "06d70bfe3decf52ff271ea849e10088741e3e1d02b41ce87ea02bb678a4999bd"
},
"downloads": -1,
"filename": "recipe_scrapers_ap_fork-14.24.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "27a268452739e3d121cfe3d3fa1ce25f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 152988,
"upload_time": "2023-06-04T08:50:10",
"upload_time_iso_8601": "2023-06-04T08:50:10.855465Z",
"url": "https://files.pythonhosted.org/packages/28/1d/4f949c9ce4120964b86e1d350907911c550c9f2df810aa23795d19eb888c/recipe_scrapers_ap_fork-14.24.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2b568c4746bfb799ce1157577f1997b8017e71302731c435cb3ca672542379c8",
"md5": "9ea4d0524ea326dab760c7aaf7dd65fc",
"sha256": "592a4247893f39bb0226f34dcf448da4202d1a5b187f4a6fa495c7068cd44768"
},
"downloads": -1,
"filename": "recipe_scrapers_ap_fork-14.24.7.tar.gz",
"has_sig": false,
"md5_digest": "9ea4d0524ea326dab760c7aaf7dd65fc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 267486,
"upload_time": "2023-06-04T08:50:13",
"upload_time_iso_8601": "2023-06-04T08:50:13.661684Z",
"url": "https://files.pythonhosted.org/packages/2b/56/8c4746bfb799ce1157577f1997b8017e71302731c435cb3ca672542379c8/recipe_scrapers_ap_fork-14.24.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-04 08:50:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hhursev",
"github_project": "recipe-scrapers",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"tox": true,
"lcname": "recipe-scrapers-ap-fork"
}