Skip to content

Instantly share code, notes, and snippets.

View burgerga's full-sized avatar

Gerhard Burger burgerga

View GitHub Profile
@burgerga
burgerga / ah_to_mealie.py
Created April 7, 2024 22:54 — forked from tverlaan/ah_to_mealie.py
Mealie can't scrape ah.nl from docker, but it works elsewhere. This is a workaround to scrape recipes from ah.nl and call the mealie api to store them.
import requests
import uuid
from recipe_scrapers import scrape_html
MEALIE_TOKEN = ""
MEALIE_URL = ""
MEALIE_TAG_ID = ""
MEALIE_HEADERS = {"Authorization": "Bearer " + MEALIE_TOKEN}
AH_HEADERS = {"Accept-Language": "nl", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:124.0) Gecko/20100101 Firefox/124.0"}