webscraper hotfix

This commit is contained in:
Hayden 2021-01-18 08:19:45 -09:00
parent 4fd2de0b6e
commit d0faa52cfd
5 changed files with 110 additions and 91 deletions

View File

@ -4,7 +4,6 @@ on:
push:
branches:
- dev
- master
jobs:
build:

49
.github/workflows/dockerbuild.prod.yml vendored Normal file
View File

@ -0,0 +1,49 @@
name: Docker Build Dev
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
#
# Checkout
#
- name: checkout code
uses: actions/checkout@v2
#
# Setup QEMU
#
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all
#
# Setup Buildx
#
- name: install buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true
#
# Login to Docker Hub
#
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
#
# Build
#
- name: build the image
run: |
docker build --push \
--tag hkotel/mealie:latest \
--platform linux/amd64,linux/arm/v7,linux/arm64 .

View File

@ -1,107 +1,69 @@
{
"@context": "http://schema.org",
"@context": "http://schema.org/",
"@type": "Recipe",
"articleBody": "\u201cMy great-grandmothers were Indigenous and mostly nomadic, which means lots of fungi foraging,\u201d says Maricela Vega, the chef at Atlanta restaurant 8ARM and founder of Chicomec\u00f3atl, an organization centering the foodways of Indigenous Mexican diaspora. \u201cWhen I serve lion\u2019s mane mushrooms to vegans they sometimes mistake them for chicken, but they\u2019re more affordable, better for the planet, and help strengthen your immune system! They grow wild during Georgia winters, but at-home cultivation kits are easy for those without forest access. I use pumpkin hot sauce, oil, and fresh herbs as a marinade, then bust out a baby grill or cast-iron skillet to get them nice and crispy.\u201d This is a multistep recipe but perfect for long winter days when you want to flood the house with toasty, irresistible aromas. When you chop the mixed herbs, save the stems and throw them into the blanching water for the vegetables to add flavor.",
"alternativeHeadline": "This dish is perfect for long winter days when you want to flood the house with toasty, irresistible aromas.",
"dateModified": "2021-01-11 18:32:43.962000",
"datePublished": "2021-01-12 04:00:00",
"keywords": [
"recipes",
"healthyish",
"vegan",
"herb",
"apple cider vinegar",
"kosher salt",
"carrot",
"potato",
"radicchio",
"mushroom",
"oyster mushrooms",
"oil",
"black pepper",
"lemon",
"web"
],
"thumbnailUrl": "https://assets.bonappetit.com/photos/5ffc74b39cbb0a3c54d7400f/1:1/w_1199,h_1199,c_limit/HLY-Maricela-Vega-Grilled%20Mushrooms%20and%20Root%20Vegetables.jpg",
"publisher": {
"@context": "https://schema.org",
"@type": "Organization",
"name": "Bon App\u00e9tit",
"logo": {
"@type": "ImageObject",
"url": "https://www.bonappetit.com/verso/static/bon-appetit/assets/logo-seo.328de564b950e3d5d1fbe3e42f065290ca1d3844.png",
"width": "479px",
"height": "100px"
"name": "Romige linguine met broccoli met geitenkaas, walnoot en semi-gedroogde tomaten",
"author": "HelloFresh",
"image": "romige-linguine-met-broccoli-met-geitenkaas-walnoot-en-semi-gedroogde-tomaten.jpg",
"thumbnailUrl": "https://img.hellofresh.com/f_auto,fl_lossy,h_300,q_auto,w_450/hellofresh_s3/image/5f6b33831268ce386f370e83-a3c36485.jpg",
"description": "Linguine is Italiaans voor: a) linten, b) tongetjes of c) lijnen? Het antwoord vind je op de receptkaart!",
"datePublished": "2020-09-23 11:37:39+00:00",
"totalTime": "0:20:00",
"nutrition": {
"@type": "NutritionInformation",
"calories": "761 kcal",
"fatContent": "37 g",
"saturatedFatContent": "13 g",
"carbohydrateContent": "75 g",
"sugarContent": "9 g",
"proteinContent": "27 g",
"fiberContent": "12 g",
"cholesterolContent": "0 mg",
"sodiumContent": "1 g",
"servingSize": 519
},
"url": "https://www.bonappetit.com"
},
"isPartOf": {
"@type": [
"CreativeWork",
"Product"
],
"name": "Bon App\u00e9tit"
},
"isAccessibleForFree": true,
"author": [
{
"@type": "Person",
"name": "Maricela Vega",
"sameAs": "https://bon-appetit.com/contributor/maricela-vega/"
}
],
"description": "This dish is perfect for long winter days when you want to flood the house with toasty, irresistible aromas.",
"image": "grilled-mushrooms-and-root-vegetables.jpg",
"headline": "Grilled Mushrooms and Root Vegetables",
"name": "Grilled Mushrooms and Root Vegetables",
"recipeIngredient": [
"1 cup Sesame Cr\u00e8me",
"2 Tbsp. Allium Confit",
"2 Tbsp. finely chopped mixed tender herbs (parsley, oregano, and/or mint), stems reservedfor blanching vegetables",
"2 Tbsp. apple cider vinegar",
"Kosher salt, freshly ground pepper",
"1 cup finely chopped mixed herbs (parsley, oregano, and/or mint), stems reserved for blanching vegetables",
"Kosher salt",
"4 medium carrots (about 1 lb.), preferably rainbow, scrubbed, halved lengthwise, cut crosswise into thirds",
"4 lb. baby potatoes, halved",
"1 head of radicchio, coarsely chopped, divided",
"1 lb. lion\u2019s mane, king trumpet, or oyster mushrooms, cut into 2\" pieces",
"\u00bd cup Pumpkin Hot Sauce",
"\u00bd cup grapeseed or vegetable oil",
"Freshly ground black pepper",
"1 cup Spiced Pecans",
"1 lemon, halved"
],
"recipeInstructions": [
{
"text": "Pur\u00e9e Sesame Cr\u00e8me, Allium Confit, chopped herbs, and vinegar in a blender on high speed, adding ice water by the tablespoonful as needed to achieve a pourable consistency, until smooth and creamy. Season sauce with salt and pepper."
"text": "Bereid de bouillon.Kook ruim water in een pan met deksel voor de linguine en de broccoli. Snijd de bloem van de broccoli in roosjes en de steel in blokjes. Snipper de sjalot en pers de knoflook of snijd fijn."
},
{
"text": "Fill a large pot three quarters full with water, add reserved herb stems, and season heavily with salt. Bring water to a boil, then add carrots and cook until just tender, about 3 minutes. Using a slotted spoon, immediately transfer carrots to a large bowl of ice water and let cool."
"text": "Snijd de semi-gedroogde tomaten klein.Kook de linguine, afgedekt, 10 \u2013 12 minuten in de pan met deksel.Voeg na 5 \u2013 7 minuten de broccoli toe aan de linguine. Giet daarna af en laat zonder deksel uitstomen."
},
{
"text": "Place potatoes in same pot and return to a boil. Cook until tender (flesh should be easy to pierce with a fork), about 10 minutes. Using slotted spoon, transfer potatoes to bowl of ice water and let cool. Drain carrots and potatoes; place in a clean large bowl and add half of the radicchio. Place mushrooms in a medium bowl."
"text": "Verhit ondertussen de olijfolie in een wok of hapjespan met deksel en fruit de sjalot, knoflook en gedroogde oregano 2 - 3 minuten op middelmatig vuur.Voeg de bouillon en de kookroom toe en breng aan de kook.Voeg de linguine, broccoli en de helft van de geitenkaas toe en verhit nog 1 minuut. Meng er de semi-gedroogde tomaten door en breng op smaak met peper en zout."
},
{
"text": "Whisk Pumpkin Hot Sauce, oil, and chopped herbs in another medium bowl. Pour half of mixture over carrots and potatoes and the other half over mushrooms; toss each to coat. Season with salt and pepper."
},
{
"text": "Prepare a grill for medium-high heat. (Alternatively, heat a large cast-iron skillet over medium-high.) Grill mushrooms, turning occasionally, until deep golden brown and crisp around the edges (or cook in batches, stirring often, if using a skillet), 12\u201314 minutes. Transfer mushrooms to a large shallow serving bowl."
},
{
"text": "Grill carrots, potatoes, and radicchio, turning occasionally, until deep golden brown all over (or cook in batches, tossing often, if using a skillet), about 4 minutes. Transfer vegetables to bowl with mushrooms and toss to combine."
},
{
"text": "To serve, drizzle generously with sesame sauce; top with Spiced Pecans and remaining radicchio. Squeeze juice from each lemon half over."
"text": "Verdeel de pasta over de borden.Bestrooi met de overige geitenkaas en de walnootstukjes."
}
],
"recipeYield": "4 Servings",
"url": "https://www.bonappetit.com/recipe/grilled-mushrooms-and-root-vegetables",
"slug": "grilled-mushrooms-and-root-vegetables",
"orgURL": "https://www.bonappetit.com/recipe/grilled-mushrooms-and-root-vegetables",
"recipeIngredient": [
"200 g Broccoli",
"\u00bd stuks Sjalot",
"1 stuks Knoflookteen",
"35 g Semi-gedroogde tomaten",
"10 g Walnootstukjes",
"90 g Linguine",
"1 tl Gedroogde oregano",
"25 g Geraspte belegen geitenkaas",
"75 ml Groentebouillon",
"\u00bd el Olijfolie",
"naar smaak Peper en zout",
"40 ml Kookroom"
],
"recipeYield": 2,
"keywords": [
"Familie",
"Veggie",
"Lekker snel"
],
"recipeCategory": "Hoofdgerecht",
"recipeCuisine": "Italiaans",
"slug": "romige-linguine-met-broccoli-met-geitenkaas-walnoot-en-semi-gedroogde-tomaten",
"orgURL": "https://www.hellofresh.nl/recipes/romige-linguine-met-broccoli-5f6b33831268ce386f370e83",
"categories": [],
"tags": [],
"dateAdded": null,
"notes": [],
"extras": []
"extras": [],
"prepTime": null,
"performTime": null
}

View File

@ -57,7 +57,17 @@ def normalize_yield(yld) -> str:
return yld
def normalize_time(time_entry) -> str:
if type(time_entry) == type(None):
return None
elif type(time_entry) != str:
return str(time_entry)
def normalize_data(recipe_data: dict) -> dict:
recipe_data["totalTime"] = normalize_time(recipe_data.get("totalTime"))
recipe_data["prepTime"] = normalize_time(recipe_data.get("prepTime"))
recipe_data["performTime"] = normalize_time(recipe_data.get("performTime"))
recipe_data["recipeYield"] = normalize_yield(recipe_data.get("recipeYield"))
recipe_data["recipeInstructions"] = normalize_instructions(
recipe_data["recipeInstructions"]

View File

@ -10,7 +10,6 @@ logging.basicConfig(
level=LOGGER_LEVEL,
format="%(asctime)s %(levelname)s: %(message)s",
datefmt="%d-%b-%y %H:%M:%S",
filename=LOGGER_FILE,
)
logger = logging.getLogger(__name__)