GithubHelp home page GithubHelp logo

amanga's Introduction

下载漫画咯

Build Status npm code style: prettier npm

Install

$ npm install -g amanga

Or Yarn:

$ yarn global add amanga

Usage

$ amanga --help
    Manga Downloader

    Usage
        $ amanga [OPTION]... URL

    optional arguments:
        --version           Print version and exit
        --help              Print this help message and exit

    Dry-run options:
        -i, --info          Print extracted information

    Download options:
        -o DIR, --output-dir DIR
                            Set output directory
        -f, --focus         Force overwriting existing files
        --ext EXT
                            Image format [default: jpeg]

    Example:
        $ amanga https://nhentai.net/g/281945/

代理,比如 manhuagui 的巨人就需要代理才能看的到,而下载也是同样需要代理。amanga 使用 global-agent 来实现代理功能,使用环境变量 GLOBAL_AGENT_HTTP_PROXY 带上代理地址

$ GLOBAL_AGENT_HTTP_PROXY=http://127.0.0.1:8888 amanga https://nhentai.net/g/281945/

Todos

  • 支持批量下载

Supported Sites

Name Home Example
看漫画 https://manhuagui.com amanga https://www.manhuagui.com/comic/4740/
nhentai https://nhentai.net amanga https://nhentai.net/g/281945/
鼠绘漫画网 https://www.ishuhui.com amanga https://www.ishuhui.com/comics/detail/11746/
YYLS 漫画 http://8comic.se amanga http://8comic.se/65178/
腾讯动漫 https://ac.qq.com amanga https://ac.qq.com/ComicView/index/id/505430/cid/972/
LHScan https://lhscan.net amanga https://lhscan.net/read-mairimashita-iruma-kun-raw-chapter-125.html

Develop

克隆代码

$ git clone https://github.com/minosss/amanga.git
$ cd amanga

安装依赖

$ yarn install

添加新的网站类型放在 source/lib 目录下,例子:

// lib/hello.js
const {getContent, downloadUrls} = require('../util');
// 处理下载
exports.download = async (url, flags) => {
	const html = getContent(url);
	// 处理解析...balabala
	// 丢到下载
	await downloadUrls({images, title, flags, site: 'hello'});
	// images 图片的地址数组 [url, url, url]
	// title 标题,会当作目录
	// site 输出时使用
	// flags 命令行参数
};
// 处理多话下载
exports.downloadList = async (url, flags) => {};

测试

$ node source/cli.js URL
# ...

License

MIT

amanga's People

Contributors

minosss avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.