Skip to content

Commit

Permalink
Merge pull request #2822 from michael-genson/fix/add-url-to-opengraph…
Browse files Browse the repository at this point in the history
…-scraper

fix: Use Scraped URL instead of Open Graph URL when importing a recipe via URL
  • Loading branch information
boc-the-git committed Dec 11, 2023
2 parents 32616a8 + e5f278f commit a6ec488
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions mealie/services/scraper/scraper_strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,6 @@ async def parse(self):


class RecipeScraperOpenGraph(ABCScraperStrategy):
"""
Abstract class for all recipe parsers.
"""

async def get_html(self, url: str) -> str:
return await safe_scrape_html(url)

Expand Down Expand Up @@ -241,7 +237,7 @@ def og_fields(properties: list[tuple[str, str]], field_name: str) -> list[str]:
"recipeIngredient": ["Could not detect ingredients"],
"recipeInstructions": [{"text": "Could not detect instructions"}],
"slug": slugify(og_field(properties, "og:title")),
"orgURL": og_field(properties, "og:url"),
"orgURL": self.url,
"categories": [],
"tags": og_fields(properties, "og:article:tag"),
"dateAdded": None,
Expand Down

0 comments on commit a6ec488

Please sign in to comment.