
Security News
pnpm 10.12 Introduces Global Virtual Store and Expanded Version Catalogs
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
fetch-meta-tags
Advanced tools
Fetch and parse OG tags and metadata from any URL, the fast way
I wanted a way to quickly fetch OG tags from websites and get their title, description, icon and OG image. I found all existing solutions to not be ideal because:
fetch-meta-tags
solves those problems by:
node-html-parser
. Very lightweight library and also very fast</head>
is received. No need to fetch the whole HTML of the website$ yarn add fetch-meta-tags
$ npm install --save fetch-meta-tags
For Typescript project you can also use the types package:
$ yarn add fetch-meta-tags @types/fetch-meta-tags
$ npm install --save fetch-meta-tags @types/fetch-meta-tags
import fetchMeta from 'fetch-meta-tags'
await fetchMeta('https://luisc.xyz')
await fetchMeta('https://luisc.xyz', { method: 'GET', cache: 'no-cache' })
Outputs:
{
url: 'https://luisc.xyz',
title: 'Luis Cuende',
description: 'Musings about modern philosophy, productivity and unbundling the nation state with crypto/Web3.',
icon: 'https://luisc.xyz/favicon.ico',
image: 'https://luisc.xyz/logo.jpg'
}
https://github.com/mozilla/page-metadata-parser for the meta tag rulesets.
MIT License
FAQs
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.