Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shindan

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shindan

shindanmaker web scraper

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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.

Usage

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.
    • result string. Diagnosis result.
    • error Error. You can get request errors, which are internet issues, and parsing errors, which would happen because ShindanMaker changed their site markup.

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

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.
    • 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
      • diagnoses number. Number of diagnoses given. Sometimes inaccurate.
      • description string. Shindan description
      • favorites number. Number of favorites
      • author string. Whoever wrote the shindan
      • tags array. An array of strings representing the tags given to this shindan

Keywords

FAQs

Package last updated on 28 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc