JSPM

@rojo2/metadata

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q26610F
  • License MIT

Extract metadata (open graph, linked data and metadata) easily from web pages

Package Exports

  • @rojo2/metadata

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rojo2/metadata) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Metadata

Build Status Coverage Status

Extracts OpenGraph data, linked data and metadata from web pages in a very easy way.

Using it as a module

import metadata from '@rojo2/metadata';

const pageMetadata = await metadata.get('https://<product url>')
console.log(pageMetadata)

Using it as a CLI

$ npm i -g @rojo2/metadata
$ metadata <url>

Using it as a serverless API

If you use now you can simply run now and you'll have a useful serverless service for extracting web page metadata.

$ now

How to test it

$ npm install
$ npm test

TODO

  • Add more tests/better code coverage
  • Add better open graph parsing (right now it only extracts type, image, title, description and url)
  • Add more user agents (or make an optional parameter to pass your own user agent)
  • Add more serverless services?
  • Add dockerized version?

Contributors

License

The MIT License

Donate

Made with ❤️ by ROJO 2 http://rojo2.com