mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-04 04:55:21 +02: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
1 changed files with 1 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue