1.0.6 • Published 4 years ago
url-content v1.0.6
url-content
url-content is a module which parse a content by passing an url.
Install it
$ npm install --save url-content
import urlContent from 'url-content';
Methods
getMetadatas
getMetadatas get metadatas from a page.
urlContent.getMetadatas('http://google.com').then(meta => {
// meta object
/* author,
authorlink,
canonical,
description,
ico,
publisher,
robots,
shortlink,
title */
});
getContent
getContent get all the html content from a page.
urlContent.getContent('http://google.com').then(content => {
});
getImages
getImages get all images found in html content from a page. The results is an array with all the images;
urlContent.getImages('http://google.com').then(images => {
});