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

shindan

v2.0.3

Published

shindanmaker web scraper

Downloads

2

Readme

shindan

shindanmaker web scraper

NPM

shindan is a web scraper for ShindanMaker, a joke fortune telling website.

const shindan = require('shindan')

shindan
  .diagnose(587327, 'Pudding')
  .then(console.log) // Yes, Pudding is 795% cute.

Authors on ShindanMaker create short, often comical diagnoses based on message fragments that are shuffled together, and then visitors enter their names and read these random diagnoses with their names inserted in. I couldn't find an official API to do this on ShindanMaker's site, so I decided to just scrape their website for data.

Diagnoses

promise = shindan.diagnose(shindanID, name[, callback])

Sends a request to ShindanMaker for the provided shindanID with your name.

  • shindanID number. You can find this in your shindan's uri. Must be an integer.
  • name string. Who is the diagnosis for? Can't be an empty string, but can be anything else ShindanMaker supports.
  • promise / callback You can use either or both.
    • error Error. You can get request errors and parsing errors
    • result object. Diagnosis result. Currently only has one property but will eventually have more.
      • result string. Your result.

Generally, providing the same pair of arguments will give you the same results for a day. Try it yourself for more details.

Shindan listing

promise = shindan.list([options], [callback])

Scrapes ShindanMaker's list page, passing options as a query string.

  • options You can either provide an object or a string here. If you leave this blank, you'll get the newest listing.
    • string. Provide a string instead of an object and it'll be treated as the mode parameter.
    • object. Query string parameters. Some useful ones:
      • mode Your list mode. You can find them by browsing ShindanMaker, but the most useful one is probably hot for HOT items.
      • p List page.
  • promise / callback You can use either or both.
    • error Error. You can get request errors.
    • results array. An array of objects representing the items found in the list
      • order number. The current list index
      • id number. Shindan ID
      • title string. Shindan name / title
      • author string. Whoever wrote the shindan
      • description string. Shindan description
      • tags array. An array of strings representing the tags given to this shindan
      • favorites number. Number of favorites
      • diagnoses number. Number of diagnoses given. Sometimes inaccurate.