Socket
Socket
Sign inDemoInstall

meta-fetcher

Package Overview
Dependencies
23
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    meta-fetcher

simple metadata scrapper for node.js


Version published
Weekly downloads
286
increased by44.44%
Maintainers
1
Install size
1.49 MB
Created
Weekly downloads
 

Readme

Source

meta-fetcher

GitHub Workflow Status (branch) npm

Simple metadata scrapper for node.js. Under the hood it uses isomorphic-unfetch
to fetch the metadata, parses it and returns it as json object.


Installation

npm install meta-fetcher

or use yarn

yarn add meta-fetcher

Usage

import metaFetcher from 'meta-fetcher';

(async () => {
  const result = await metaFetcher('https://hoppscotch.io/');
  console.log(result);

  /*
        {
            metadata: {
                website: 'https://hoppscotch.io/',
                title: 'Hoppscotch - Open source API development ecosystem',
                description: 'Helps you create requests faster, saving precious time on development.',
                banner: 'https://hoppscotch.io/banner.jpg',
                themeColor: '#202124'
            },
            socials: {
                'twitter:site': '@hoppscotch_io',
                'twitter:creator': '@hoppscotch_io'
            },
            favicons: [
                'https://hoppscotch.io/_nuxt/icons/icon_64x64.9834b3.png',
                'https://hoppscotch.io/_nuxt/icons/icon_512x512.9834b3.png'
            ]
        }
    */
})();

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.


Here are some related projects

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

License

MIT

Keywords

FAQs

Last updated on 12 Jun 2021

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc