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

hermitpurple

v0.2.0

Published

A Wikia/Fandom scrapper that uses minimal dependencies

Downloads

20,362

Readme

img

This scrapper is a modified version of @yimura/scraper, check it out!

Why use this scrapper?

Some wikia/fandom pages have switched to mediawiki or have some apis disabled.

Example Code

CommonJS:

const HermitPurple = require('hermitpurple').default;

const wikia = new HermitPurple("jojo", 1); // fandom, search limit

wikia.search('Josuke Higashikata').then(results => {
    console.log(results);
});

ESModule:

import hermitpurple from 'hermitpurple'

const wikia = new hermitpurple.default("jojo", 1); // fandom, search limit
wikia.search('Josuke Higashikata').then(results => {
    console.log(results);
});

Example Result

[
  {
    id: '11883',
    url: 'https://jojo.fandom.com/wiki/Josuke_Higashikata_(JoJolion)',
    img: 'https://static.wikia.nocookie.net/jjba/images/d/d2/Jo2uke.png/revision/latest/scale-to-width-down/  350?cb=20200105132036',
    article: `The tentatively-named Josuke Higashikata (東方 定助, Higashikata Jōsuke) is the protagonist of JoJolion. He   is the eighth JoJo of the JoJo's Bizarre Adventure series. Josuke is a young man afflicted with retrograde amnesia,   lacking any memories prior to being discovered by Yasuho Hirose near the Wall Eyes in Morioh Town. He dedicates   himself to discovering his former identity and those originally associated with him. Josuke's original identity was   that of Josefumi Kujo (空条 仗世文, Kūjō Josefumi), and became his current self after fusing with the man Yoshikage  Kira (吉良 吉影, Kira Yoshikage). Josuke is a Stand User and retains his original identity's Soft & Wet. Josuke is a  young, handsome and physically fit man of above-average height. He wears a tasseled "Dixie cup" sailor cap (in  multiple illustrations, it is adorned with the same palm insignia as Jotaro Kujo's hat). He wears a sailor suit, cut  with a wide neck and above the navel, a neckerchief with a button resembling a slotted screw head, large emblems of   an anchor on his right side and a compass rose on his left, fitted pants with a belt, and a pair of high-top athletic   shoes. After partaking in an equivelant exchange to save his life. Josuke has segmented rocks which form a  running...`,
    title: 'Josuke Higashikata'
  }
]

Other functions

HermitPurple#searchResults: returns an array of the search results, without fetching the articles HermitPurple#getArticle: returns and fetches only the provided article

For examples look in the test/ folder