use scraper URL instead of og tag

This commit is contained in:
Michael Genson 2023-12-11 04:37:00 +00:00
parent 780f0b9ca5
commit 275bb9617a

View File

@ -208,10 +208,6 @@ class RecipeScraperPackage(ABCScraperStrategy):
class RecipeScraperOpenGraph(ABCScraperStrategy): class RecipeScraperOpenGraph(ABCScraperStrategy):
"""
Abstract class for all recipe parsers.
"""
async def get_html(self, url: str) -> str: async def get_html(self, url: str) -> str:
return await safe_scrape_html(url) return await safe_scrape_html(url)
@ -241,7 +237,7 @@ class RecipeScraperOpenGraph(ABCScraperStrategy):
"recipeIngredient": ["Could not detect ingredients"], "recipeIngredient": ["Could not detect ingredients"],
"recipeInstructions": [{"text": "Could not detect instructions"}], "recipeInstructions": [{"text": "Could not detect instructions"}],
"slug": slugify(og_field(properties, "og:title")), "slug": slugify(og_field(properties, "og:title")),
"orgURL": og_field(properties, "og:url"), "orgURL": self.url,
"categories": [], "categories": [],
"tags": og_fields(properties, "og:article:tag"), "tags": og_fields(properties, "og:article:tag"),
"dateAdded": None, "dateAdded": None,