Skip to content

Commit

Permalink
Fix issue #1491, data that is not an object in json-ld @graph (#1492)
Browse files Browse the repository at this point in the history
  • Loading branch information
jochem261 authored Feb 22, 2025
1 parent 3553a1d commit 1fdfbea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions recipe_scrapers/_schemaorg.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def _find_entity(self, item, schematype):
return item
for graph in item.get("@graph", []):
for node in graph if isinstance(graph, list) else [graph]:
if not isinstance(node, dict):
continue
if self._contains_schematype(node, schematype):
return node

Expand Down

0 comments on commit 1fdfbea

Please sign in to comment.