mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-09 03:04:54 -04:00
Merge pull request #2822 from michael-genson/fix/add-url-to-opengraph-scraper
fix: Use Scraped URL instead of Open Graph URL when importing a recipe via URL
This commit is contained in:
commit
a6ec488864
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user