unfurl
unfurl copied to clipboard
Product information
Hi @blakeembrey, I just wanted to follow up on this comment that you made around product information in metascraper repo.
Ran it on the current version of Scrappy and it extracted production information from them all (blakeembrey/node-scrappy@612dff2) - all of them are using microdata. Someone just needs to use that microdata.
Could you explain how to get started 'using that microdata'? Would that mean creating a new kind of a snippet which uses that data?
Thank you!
If you look in the test snapshots, you can find some microdata instances exposing product and other information. The snippet process is two step - first step is extraction of all metadata and the second step is turning that metadata into a snippet. To get a better snippet, you'd just have to improve the snippet step (it is plugable, so you can pass additional snippet helper functions - https://github.com/blakeembrey/node-scrappy/blob/553295a26279c76aa4711e28bdd532caa2bc0fc6/src/extract/index.ts#L12).
It doesn't currently exist as part of the current snippet because it's getting a bit heavier into the JSON-LD side of things and I haven't resolved how to expose that properly yet.
I see, that is good to know! I am noticing that there is no test/fixtures directory even though your previous links had linked there to see sample - has that been refactored away in the new version?
It was refactored away into Jest snapshots. Same thing, different format basically.