Skip to content

Python 📦 to compile recipe URLs from recipe websites.

License

Notifications You must be signed in to change notification settings

mkayeterry/recipe-urls

Repository files navigation

recipe-urls

Overview

recipe-urls is a Python package designed to gather recipe URLs from a given base URL or from provided HTML content.


Installation

pip install recipe-urls

Usage

from recipe_urls import scrape_urls, scrape_html

Example usage

base_urls = ['https://bakingmischief.com', 'https://www.allrecipes.com/recipes/80/main-dish/']
compiled_recipe_links = []

for base_url in base_urls:
    scraped_links = scrape_urls(base_url)
    compiled_recipe_links.extend(scraped_links)
input_html = [baking_mischief_html, all_recipes_html]
compiled_recipe_links = []

for html_content in input_html:
    scraped_links = scrape_html(html) # optionally, scrape_html(html, base_url)
    compiled_recipe_links.extend(scraped_links)

Supported Websites

Acknowledgments

This package was inspired by (and meant to be used in conjunction with) recipe-scrapers by hhursev. Thanks for making the intersection of programming and recipes more doable!

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Python 📦 to compile recipe URLs from recipe websites.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages