Unknown JSON-LD item #10
Comments
Thanks for reporting! I'm on holidays right now but will look into this as soon as possible! |
I've got around the warning by defining the parsers manually and exluding the JsonLD parser, I'm less interested in JsonLD but it would be nice to find a fix at some point. Enjoy your holidays! |
@danjaywing Serveral things:
$parsers = \Jkphl\Micrometa\Parser\Microformats2::PARSE | // Microformats = 1
\Jkphl\Micrometa\Parser\Microdata::PARSE | // Microdata = 2
\Jkphl\Micrometa\Parser\JsonLD::PARSE; // JSON-LD = 4
$micrometaParser = new \Jkphl\Micrometa($url, null, $parsers);
|
Thanks for the fix. The following is an example of a page containing microdata that isn't parsed: As you can see from the source code, there is a product type, but when I attempt to parse the url, no data for the product is retrieved. Possibly an issue with their code. If your parser identifies 'mainEntityOfPage' does it begin parsing inside it? |
@danjaywing Thanks, I'll dig into it! :) |
Sorry, updated my last comment as there IS microdata coming through but none for the main product |
I've edited the original post with all current examples I've found, sorry if it seems nitpicky! |
@danjaywing Thanks for your edits — and sorry, I found them only now. I released a new parser for RDFa Lite and HTML Microdata just yesterday which I plan to integrate into micrometa soon. I'll get back to this issue as soon as the new parser's working under the hood ... |
Ok thanks! |
@danjaywing FYI: I just published the next major release with improved support for additional formats. I did a rough check with your list of example files. They all yield results now, I think there are still some issues with HTML Microdata parsing though. I will further track these over at jkphl/rdfa-lite-microdata#6. Thanks again for this valuable set of examples! |
Hi
I'm looking to build a script that sees what data it can glean from any given url, microdata first, then content. Your parser seems perfect for that, but I've noticed a case where an error is thrown in certain situations.
I'm giving the following url:
http://www.currys.co.uk/gbuk/computing/laptops/laptops/lenovo-yoga-510-14-2-in-1-black-10146249-pdt.html
And I'm getting the following warning:
Is it finding microdata but attempting to parse it as JSON-LD?
I've also noticed cases where no data is obtained though microdata is used on the page, is this indicative of poor configuration their end?
Thanks in advance
EDIT
Here's a list of urls with data that either isn't being returned, or is buggy:
http://www.argos.co.uk/product/6707596
As you can see from the source code, there is a product type, but when I attempt to parse the url, no data for the product is retrieved.
http://www.johnlewis.com/apple-ipad-pro-a9x-ios-9-7-wi-fi-128gb/p2609387?colour=Silver
The product rating on this page is there, but it isn't returned.
Also, the product availability returns "http://schema.org/InStock" rather than the value/content.
http://allrecipes.com/recipe/219164/the-best-parmesan-chicken-bake/?internalSource=popular&referringContentType=home%20page&clickId=cardslot%2010
The prep, cook and total time data on this recipe page isn't parsed.
http://mashable.com/2017/02/14/spiderman-attacks-runner/?utm_cid=hp-h-1#sYDxayVyimqj
The json data is returned but the property types are set as the key as opposed to the name, so the properties are inaccessible via the usual method.
I appreciate that some of these may be down to the implementation of the microdata on the pages themselves.
The text was updated successfully, but these errors were encountered: