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

flump

v1.1.3

Published

Fandom wiki gallery scraper.

Downloads

111

Readme

A simple CLI tool for mass-downloading full-size images from Fandom wiki pages' image galleries.

Contents

In Fandom galleries, images are usually scaled down and the URL to the full-size image is often not present in the DOM until a user clicks on the image thumbnail (opening the image lightbox). Because of this, most simple image scrapers end up downloading very scaled-down, lower quality versions of images from galleries. The images in galleries are also often lazy loaded, which makes scraping harder.

This tool gets around that. It uses puppeteer and is designed to be reliablenot fast. For big pages (like this one), it can take around 5 minutes to download everything.

Note: Images that are not part of a Fandom gallery (see this definition) are not downloaded.

Installation

This tool can be installed with NPM:

npm install -g flump

Usage

All you have to do is pass the URL to the wiki page as an argument:

flump "page-url-here"

You can also set the destination folder for the images:

flump "page-url-here" --output="folder-name"

Command-Line Options

Usage: flump [options] <url>

Fandom wiki gallery scraper.

Arguments:
  url                  URL of a Fandom wiki page to scrape

Options:
  -V, --version        output the version number
  -o, --output <path>  directory where images should be dumped
  -q, --quiet          silence log messages
  -h, --help           display help for command

API

flump.scrapeImages(url) ⇒ Promise.<Array.<string>>

Scrape a Fandom wiki page for gallery images and get their URLs.

Kind: static method of flump
Returns: Promise.<Array.<string>> - A list of image URLs as strings.

| Param | Type | Description | | --- | --- | --- | | url | string | URL to a Fandom wiki page. |

flump.downloadImages(url, options) ⇒ Promise.<void>

Scrape a Fandom wiki page for gallery images and download all of them.

Kind: static method of flump

| Param | Type | Description | | --- | --- | --- | | url | string | URL to a Fandom wiki page. | | options | FlumpOptions | Additional options. See FlumpOptions. |

flump~FlumpOptions : Object

Additional options passed to downloadImages.

Kind: inner typedef of flump
Properties

| Name | Type | Description | | --- | --- | --- | | quiet | boolean | Silence log messages. | | output | string | The output folder for images. |