rocktimsaikia / meta-fetcher

Simple metadata scrapper for node.js

Home Page:https://npmjs.com/meta-fetcher

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

meta-fetcher

CI npm

Simple metadata scrapper.

Installation

yarn add meta-fetcher

Usage

import metaFetcher from 'meta-fetcher';

const result = await metaFetcher('https://hoppscotch.io/');

console.log(result);

Output:

{
  "title": "Hoppscotch - Open source API development ecosystem",
  "description": "Helps you create requests faster, saving precious time on development.",
  "image": "https://hoppscotch.io/og.png",
  "url": "https://hoppscotch.io/",
  "siteName": "Hoppscotch",
  "type": "website"
}

API

metaFetcher(input)

Takes one url string as a parameter and returns an object containing the meta-information.

input

type: string
default: 'none'

The url string to be scrapped.

Related

page-scrapper: Node.js scrapper that pulls out all links and images of a given site.

License

2024 MIT © Rocktim Saikia

About

Simple metadata scrapper for node.js

https://npmjs.com/meta-fetcher


Languages

Language:TypeScript 83.1%Language:JavaScript 16.9%