1.1.4 • Published 6 months ago

flump v1.1.4

Weekly downloads
-
License
GPL-3.0-only
Repository
github
Last release
6 months ago

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

I wrote this mostly for my own convenience. If it's useful for anyone else, I'm glad! _(:3」∠)_

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). Additionally, images are also lazy-loaded most of the time.

A naive image scraper would only be able to download small, lower quality versions of images from galleries (if any at all).

This tool gets around that. It uses puppeteer and is designed to be reliablenot fast. For big pages (like this one), it can take a couple minutes to fetch every image.

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.

ParamTypeDescription
urlstringURL 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

ParamTypeDescription
urlstringURL to a Fandom wiki page.
optionsFlumpOptionsAdditional options. See FlumpOptions.

flump~FlumpOptions : Object

Additional options passed to downloadImages.

Kind: inner typedef of flump
Properties

NameTypeDescription
quietbooleanSilence log messages.
outputstringThe output folder for images.
1.1.4

6 months ago

1.1.3

9 months ago

1.1.2

11 months ago

1.1.1

11 months ago

1.1.0

11 months ago

1.0.0

11 months ago