flump v1.1.4
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 reliable—not 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
- static
- .scrapeImages(url) ⇒ Promise.<Array.<string>>
- .downloadImages(url, options) ⇒ Promise.<void>
- inner
- ~FlumpOptions : Object
- static
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. |