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

hermitpurple

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hermitpurple

A Wikia/Fandom scrapper that uses minimal dependencies

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

Keywords

FAQs

Package last updated on 03 Nov 2020

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