1.0.1 • Published 2 years ago

mscraper v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

MScraper

Easily scrape metadata from any url or html

Usage

Installation

npm install mscraper # NPM
yarn add mscraper # YARN

Initialize

import mscraper from 'mscraper';

// From string
const scraper = new mscraper(
    '<meta name="description" content="This is an amazing website" />' // Your url
);
// From url
const scraper = await mscraper.getFromUrl(
    'https://github.com/' // Your url
);

Get the data

scraper.get('description'); // This is an amazing website
scraper.getAll(); // {tag: 'description', content: 'This is an amazing website'}