npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

metanol

v0.4.1

Published

Scrapes html metadata. MetaData html scraper and parser for Node.js

Downloads

5

Readme

Metanol - package to parse meta tags

Using parseAll to get all the metadata.

Latest Stable Version License NPM Downloads NPM Downloads

NPM

Install

npm i metanol 

Usage

For example, let's get meta-tags with articles from techcrunch.com

var metanol = require('metanol');

or es2017

import metanol from 'metanol';
metanol.parseAll('https://techcrunch.com/2016/11/27/disrupting-the-world-of-science-publishing/').then(resolver => {
    console.log(resolver);
}, err => {
    console.error(err);
});

/**
 * Fetching main meta tags
 */
metanol.parseMain('https://techcrunch.com/2016/11/27/disrupting-the-world-of-science-publishing/').then(resolver => {
    console.log(resolver);
}, err => {
    console.error(err);
});

/**
 * Fetching main meta tags from html
 */
let html = '<html><head><meta name="description" content="example description"></head></html>';

metanol.parseAll(null, html).then(resolver => {
    console.log(resolver);
}, err => {
    console.error(err);
});

/**
 * Fetching main meta tags from html
 */
metanol.parseAll(null, html).then(resolver => {
    console.log(resolver);
}, err => {
    console.error(err);
});

Output

{ _title: 'Disrupting the world of science publishing  |  TechCrunch',
  _description: 'Every scientist wants their paper to appear in Cell, Nature or Science. Being associated with such publications is synonymous with prestige and excellence...',
  _author: 'Bérénice Magistretti',
  _tags: [ 'disrupting', 'world', 'science', 'publishing', 'techcrunch' ],
  h1: 'Disrupting the world of science publishing',
  _og: 
   { url: 'http://social.techcrunch.com/2016/11/27/disrupting-the-world-of-science-publishing/',
     type: 'article',
     title: 'Disrupting the world of science publishing',
     image: 'https://tctechcrunch2011.files.wordpress.com/2016/11/sciencebook.jpg?w=764&h=400&crop=1',
     site_name: 'TechCrunch',
     description: 'Every scientist wants their paper to appear in Cell, Nature or Science. Being associated with such publications is synonymous with prestige and excellence...',
     website: '',
     profile: { first_name: '', last_name: '', username: '', gender: '' },
     book: { author: '', isbn: '', release_date: '', tag: '' },
     article: 
      { published_time: '',
        modified_time: '',
        expiration_time: '',
        author: '',
        section: '',
        tag: '' },
     video: '',
     video_type: '',
     audio: '',
     audio_type: '',
     price_amount: '',
     price_currency: '' },
  _itemProp: { name: '', description: '', image: '' },
  article: { tag: '', section: '', published_time: '', modified_time: '' },
  _twitter: 
   { card: 'summary_large_image',
     site: '@techcrunch',
     title: 'Disrupting the world of science publishing | TechCrunch',
     image: '',
     creator: '',
     description: 'Every scientist wants their paper to appear in Cell, Nature or Science. Being associated with such publications is synonymous with prestige and excellence. However, these journals are typically…' },
  _image: 'https://tctechcrunch2011.files.wordpress.com/2016/11/sciencebook.jpg?w=764&h=400&crop=1',
  _swiftType: 
   { title: 'Disrupting the world of science publishing',
     author: 'Bérénice Magistretti',
     object_type: 'post',
     url: 'https://techcrunch.com/2016/11/27/disrupting-the-world-of-science-publishing/',
     timestamp: '2016-11-27 10:00:57',
     content: 'Every scientist wants his or her paper to appear in Cell, Nature or Science. In today’s scientific world, being associated with such publications is synonymous with prestige and excellence, opening doors to top positions and coveted awards. Nonetheless, these journals are typically known to have an acceptance rate of 5-10 percent, meaning that the other 90-95 percent whose papers have been rejected are forced to find other publishing outlets that simply don’t have the same alluring impact within the academic world. ScienceMatters, a Swiss startup that launched in February, is trying to pave the way to a more democratized system by offering an open-source publishing platform to every scientist who wants to share his or her observations. “We are trying to publish the same way top science publications published 50 years ago,” explains Lawrence Rajendran, founder and CEO of ScienceMatters. “They used to publish exact observations, but now, competition for space is extremely…',
     excerpt: 'Every scientist wants their paper to appear in Cell, Nature or Science. Being associated with such publications is synonymous with prestige and excellence. However, these journals are typically known to have an acceptance rate of 5-10 percent. ScienceMatters is trying to pave the way to a more democratized system by offering an open-source publishing platform for scientists to share their work.',
     image: 'https://tctechcrunch2011.files.wordpress.com/2016/11/sciencebook.jpg?w=150',
     tag: 
      [ 'ScienceMatters',
        'scientific publishing',
        'Lawrence Rajendran',
        'open-source publishing' ] },
  _facebook: { app_id: '187288694643718' },
  _al: 
   { ios_url: '',
     ios_app_store_id: '',
     ios_app_name: '',
     android_url: '',
     android_package: '',
     android_app_name: '',
     windows_phone_app_name: '',
     windows_phone_app_id: '',
     windows_phone_app_url: '' } }

 MetaTags {
 _title: 'Disrupting the world of science publishing  |  TechCrunch',
 _description: 'Every scientist wants their paper to appear in Cell, Nature or Science. Being associated with such publications is synonymous with prestige and excellence...',
 _author: 'Bérénice Magistretti',
 _tags: '' }