🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@davidlazic/manga-scraper-cli

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
Package was removed
Sorry, it seems this package was removed from the registry

@davidlazic/manga-scraper-cli

CLI for scraping hosted manga images to local file system

unpublished
latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

Manga Scraper CLI

Download mangas of your own choosing from specific providers.
Written in TypeScript.

Table of Contents

  • Installation
  • Entities
    2.1 Providers
    2.2 Entries
  • Usage
    3.1 Basics
    3.2 Commands
    3.3 Flags
  • Development
    4.1 Node version
    4.2 Local build
  • Improvements
  • License

Installation

$ npm i -g @davidlazic/manga-scraper-cli

Notice: It is advised that you use Node version 10+ and do a global CLI installation.

Usage

Basics

CLI is accessible by using the ms command.

Make sure the CLI can access and read your own entries JSON.

$ ms list entries --url https://raw.githubusercontent.com/DavidLazic/manga-scraper-cli/master/db.example.json

Download options selection.

$ ms download --url https://raw.githubusercontent.com/DavidLazic/manga-scraper-cli/master/db.example.json
$ ms download --url ./local/path

Commands

ms list, ls <providers|entries>

List all supported download providers or available entries from a JSON configuration file.

ms download, dl

Start download options selection.

Flags

ms -u, --url <ENTRIES_PATH> (required)

Provide the CLI with location path to your entries JSON file. Path can describe location of a local or remotely hosted file.

Notice: Path needs to be absolute.

ms -V, --version

Echo the current CLI version

ms -h, --help

List available CLI flags and commands

Entities

Providers

The CLI only supports scraping of websites (called providers) that come bundled with the CLI. There is no option to extend supported providers via external configuration file.
You can see available providers by using the following command:

$ ms list providers

Notice: Code used for scraping these providers might stop working if providers introduce changes on their end, so please send a provider update request.

Entries

Entries JSON file represents configuration file which needs to contain the entries array field. The CLI will list all entries as download options.
You can see available entries by using the following command:

$ ms list entries --url <ENTRIES_PATH>

Notice: URL can point to a local file or remotely hosted one, but needs to be an absolute path.

Here's an example of entries JSON file:

{
  "entries": [
    {
      "name": "<MANGA_NAME>",
      "providers": {
        "<HOST>": "<MANGA_ID>"
      }
    }
  ]
}

Name field represents manga name.
Providers field describes a manga ID on a supported provider.

Notice: You will need to manually look for manga IDs on available providers and create entries JSON accordingly.

Development

In order to run the CLI in development mode, you'll need to install Node version manager, Win / OSX.

Node version

Make sure you're using compatible Node version:

// Switch to Node version described in .nvmrc file
$ nvm use

// If you don't have the right version, you can install it via
$ nvm install <VERSION>

Notice: These commands might be different between Win / OSX platforms, so please read the correlating nvm documentation on how to install / switch Node versions.

Local build

$ npm start

This task will create dist directory and link it locally.
It will enable you to use the ms command as though you've installed the CLI from the npm registry.

Improvements

  • [ x ] Write provider tests
  • Add more providers
  • Improve tests
  • Improve CLI UI
  • Handle server redirects
  • Handle lazy loaded images
  • Handle CDN images

License

Licensed under the MIT license.

Keywords

cli

FAQs

Package last updated on 25 May 2023

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