Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 1.23 KB

README.md

File metadata and controls

56 lines (36 loc) · 1.23 KB

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