Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

" in application/ld+json gives exception #208

Open
bodanius opened this issue Aug 21, 2023 · 0 comments
Open

" in application/ld+json gives exception #208

bodanius opened this issue Aug 21, 2023 · 0 comments

Comments

@bodanius
Copy link

File "/usr/local/lib/python3.10/dist-packages/extruct/_extruct.py", line 131, in extract
output[syntax] = list(extract(document, base_url=base_url))
File "/usr/local/lib/python3.10/dist-packages/extruct/jsonld.py", line 28, in extract_items
return [
File "/usr/local/lib/python3.10/dist-packages/extruct/jsonld.py", line 28, in
return [
File "/usr/local/lib/python3.10/dist-packages/extruct/jsonld.py", line 43, in _extract_items
data = jstyleson.loads(HTML_OR_JS_COMMENTLINE.sub("", script), strict=False)
File "/usr/local/lib/python3.10/dist-packages/jstyleson.py", line 123, in loads
return json.loads(dispose(text), **kwargs)
File "/usr/lib/python3.10/json/init.py", line 359, in loads
return cls(**kw).decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

The JSON data on the website

<script type="application/ld+json">{"@context":"http://schema.org/","@type":"Product","@id":"lego-i",...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant