You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
Invalid JSON-LD strings are ignored.
Actual behavior
Error parsing JSON-LD SyntaxError: Expected ',' or ']' after array element in JSON at position 1962
at JSON.parse (<anonymous>)
at Element.<anonymous> (/Users/nick/Development/price-tracker/node_modules/open-graph-scraper/dist/esm/lib/extract.js:106:51)
Screenshots
N/A
Additional context
Add any other context about the problem here.
OS: macOS
Node Version: 20
openGraphScraper Version: 6.8.3
tsconfig.json: N/A
Potential solution
Catch the error to allow other valid JSON-LD and Open Graph data on the page to be parsed.
Describe the bug
On invalid JSON strings an error is thrown.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Invalid JSON-LD strings are ignored.
Actual behavior
Screenshots
N/A
Additional context
Add any other context about the problem here.
Potential solution
Catch the error to allow other valid JSON-LD and Open Graph data on the page to be parsed.
The text was updated successfully, but these errors were encountered: