/html-metadata-parser

Html metadata scraper and parser for Node.js

Primary LanguageTypeScript

Html Metadata Parser

Html Metadata scraper and parser for Node.js

Install

npm install html-metadata-parser
yarn install html-metadata-parser
const { parser } = require('html-metadata-parser');

parser('https://www.youtube.com/watch?v=eSzNNYk7nVU').then(result=>{
   console.log(JSON.stringify(result, null, 3));
})
// async 
const { parser } = require('html-metadata-parser');
(async () => {
    var result = await parse('https://www.youtube.com/watch?v=eSzNNYk7nVU');
    console.log(JSON.stringify(result, null, 3));
})();
// result

{
   "og": {
      "site_name": "YouTube",
      "url": "https://www.youtube.com/watch?v=eSzNNYk7nVU",
      "title": "Rebuilding iOS 15 with Tailwind CSS",
      "image": "https://i.ytimg.com/vi/eSzNNYk7nVU/maxresdefault.jpg",
      "description": "In this video, I'll show you how to rebuild the new Notification Summary UI from iOS 15 using Tailwind CSS.Source code: https://play.tailwindcss.com/kY4LYXwsNZ",
      "type": "video.other"
   },
   "meta": {
      "title": "Rebuilding iOS 15 with Tailwind CSS",
      "description": "In this video, I'll show you how to rebuild the new Notification Summary UI from iOS 15 using Tailwind CSS.Source code: https://play.tailwindcss.com/kY4LYXwsNZ"
   },
   "images": []
}

15 Best Visual Studio Code Themes of 2021

What is the difference between PM2 Cluster vs Fork Mode

Lightbox Photo Grid and Slideshow component for Vue.JS?

Contributing

Please refer to each project's style and contribution guidelines for submitting patches and additions. In general, we follow the "fork-and-pull" Git workflow.

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

Community

Stay up to date on the development of Morioh UI and reach out to the community with these helpful resources.

Follow @codek_tv and @im_a_developer on Twitter.

Follow Morioh and Javascript Developers on FaceBook.

Join the official Discord room: https://discord.gg/sqxU6un.