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

Product information #35

Open
oyeanuj opened this issue Mar 12, 2017 · 3 comments
Open

Product information #35

oyeanuj opened this issue Mar 12, 2017 · 3 comments

Comments

@oyeanuj
Copy link

oyeanuj commented Mar 12, 2017

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 (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!

@blakeembrey
Copy link
Member

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.

@oyeanuj
Copy link
Author

oyeanuj commented Mar 14, 2017

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?

@blakeembrey
Copy link
Member

It was refactored away into Jest snapshots. Same thing, different format basically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants