google / schemarama

Schemarama is a project exploring standards-based validation for structured data, especially Schema.org.
Apache License 2.0
124 stars 22 forks source link

embedded json-ld not detected in page #30

Closed ziodave closed 3 years ago

ziodave commented 3 years ago

Hello,

I have the attached html file. The file has 3x <script type="application/ld+json"> (one of which is empty).

Should schemarama be able to parse them? The cli doesn't seem to find them:

node cli --parse --input /tmp/3.html --format turtle
<http://example.org/> <fb:admins> "1825066490"@en-us;
    <fb:app_id> "488770804557249"@en-us;
    <http://ogp.me/ns#title> "Seoul Apartments & Vacation Rentals from $20 | HomeToGo"@en-us;
    <http://ogp.me/ns#url> "https://www.hometogo.com/seoul/"@en-us;
    <http://ogp.me/ns#description> "Click here and compare 16,895 vacation rentals from 19 providers in Seoul! ✓ Find deals & save up to 40% with HomeToGo."@en-us;
    <http://ogp.me/ns#image> "//cdn2.hometogo.net/assets/media/pics/1200_628/585a9417b7c24.jpg"@en-us;
    <http://ogp.me/ns#type> "website"@en-us;
    <http://ogp.me/ns#site_name> "HomeToGo - search engine for vacation rentals"@en-us;
    <http://ogp.me/ns#locale> "en_US"@en-us;
    <article:author> "https://www.facebook.com/hometogo"@en-us.
_:df_1_0 <http://www.w3.org/1999/xhtml/vocab#role> <http://www.w3.org/1999/xhtml/vocab#combobox>.

3.zip

Gnomus042 commented 3 years ago

Hi @ziodave , the cli mode now can't get triples from html, but you can use test web demo, insert your html to the input field and run validation. It should be able to get json-ld from html and parse it.