Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jknndy committed Sep 2, 2024
1 parent 121060a commit 078455a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
11 changes: 0 additions & 11 deletions recipe_scrapers/kitchenstories.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,3 @@ class KitchenStories(AbstractScraper):
@classmethod
def host(cls):
return "kitchenstories.com"

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

# Workaround: kitchenstories has some unusual HTML escaping going on
# within their on-page schema.org metadata. Retrieve it and unescape
# the content so that we can retrieve values from it.
# Ref: https://github.com/hhursev/recipe-scrapers/issues/562
schema_data = self.soup.find("script", {"type": "application/ld+json"})
schema_data = unescape(str(schema_data))
self.schema = SchemaOrg(schema_data)
4 changes: 2 additions & 2 deletions tests/test_data/kitchenstories.com/kitchenstories.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
"To test whether the jam will set up once it's cooled, place a small spoonful of the hot jam on the plate from the freezer and hold the plate at an angle. If the mass becomes solid after a short time and you can swipe your finger through the jam leaving an unconnected gap, the test is passed and the jam is ready; if not, continue cooking and repeating the test. Pour the still hot jam into sterilized preserving jars, seal, and let cool. Enjoy!"
],
"category": "Jams & Marmalades",
"yields": "4 servings",
"description": "This recipe gives homemade strawberry jam an exciting update: Matcha!",
"total_time": 80,
"cook_time": null,
"prep_time": 20,
"cuisine": "International",
"ratings": 0.81,
"ratings": 4.3,
"ratings_count": 4,
"nutrients": {
"servingSize": "1 Servings",
Expand Down

0 comments on commit 078455a

Please sign in to comment.