struda
Structured data extraction from HTML.
;const result = ;// {// "jsonld": {// "data": [ ... ],// "errors": []// },// "microformats": {// "data": {// "items": [ ... ],// "rels": { ... },// "rel-urls": { ... }// },// "errors": []// }// }
Installation
npm install --save struda
Features
- Performance: the data is parsed in a single traversal of the DOM
- Parses jsonld and microformats (rdfa and microdata are planned)
Example
Use jsdom
outside of the browser:
;;const window = `...` url: 'https://example.com/' const result = ;