MCPcopy Index your code
hub / github.com/Xonshiz/comic-dl

github.com/Xonshiz/comic-dl @2024.02.10

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2024.02.10 ↗ · + Follow
168 symbols 663 edges 39 files 2 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

N|Solid

Comic-DL

GitHub release | Github All Releases | Donate

Service Status
PyPI Distribution PyPI
Releases Build Building & Creating Distributables
Docker Build GitHub Workflow Status
Readthedocs Build Documentation Status

Comic-dl is a command line tool to download Comics and Manga from various Manga and Comic sites easily. You can search Manga from this tool as well. Idea from youtube-dl.

If you're looking for an application, or a UI for this, please move to : CoManga

Don't overuse this script. Support the developers of those websites by disabling your adblock on their site. Advertisements pay for the website servers.

Table of Content

Supported Websites

You can check the list of supported websites HERE.

Dependencies Installation

This script can run on multiple Operating Systems. You need Node.js in your system's path for this script to work (You need this on each and every Operating System, even on WINDOWS :/). Download the Node.Js from Node.js official website. Doesn't matter which operating system you're on, this is a must. Follow the instructions mentioned below, according to your OS.

Linux/Debian :

Since most (if not all) Linux/Debian OS come with python pre-installed, you don't have to install python manually. Make sure you're using python >= 2.7.x though.

We need pip to install any external dependency(ies). So, open any terminal and type in pip list and if it shows some data, then it is fine. But, if it shows error, like pip not found or something along this line, then you need to install pip. Just type this command in terminal :

sudo apt-get install python-pip

If you're on Fedora, CentOS/RHEL, openSUSE, Arch Linux, then you simply need to follow THIS TUTORIAL to install pip.

If this still doesn't work, then you'll manually need to install pip. Doing so is an easy one time job, and you can follow THIS TUTORIAL to do so.

Windows :

If you're on Windows, then it is recommended to download the windows binary for this script. If you use the windows binary, you don't need to install anything, except Node.js. But, if for some weird reason you want to use Python script instead, then follow these steps :

  • Install Python > 2.7.6. Download the desired installer from here.
  • Add it in the system path (if not already added).
  • If you're using python >2.7.9, you don't need to install PIP. However, if you don't have pip installed and added in windows path, then do so by following this little tutorial.
  • Download this text file and put it in some directory/folder.
  • Open Command Prompt and browse to the directory where you downloaded your requirements.txt file and run this command :
pip install -r requirements.txt
  • It should install the required external libraries.

Now, install Node.Js as well and make sure it's in your path.

Well, if everything came up good without any error(s), then you're good to go!

Mac OS X :

Mac OS X users will have to fetch their version of Python and Pip. * Python installation guide : http://docs.python-guide.org/en/latest/starting/install/osx/ * Pip installation guide : http://stackoverflow.com/questions/17271319/installing-pip-on-mac-os-x

After downloading and installing these, you need to add PIP & Python in your path. Follow THIS LITTLE GUIDE to install both, Python & pip successfully.

Installation

After installing and setting up all the dependencies in your Operating System, you're good to go and use this script. The instructions for all the OS would remain same. Download THIS REPOSITORY and put it somewhere in your system. Move over to the comic_dl folder.

Windows users, it's better to not place it places where it requires administrator privileges. Good example would be C:\Windows. This goes for both, the Python script and the windows binary file (.exe).

Linux/Debian users make sure that this script is executable. Just run this command, if you run into problem(s) :

chmod +x cli.py

and then, execute with this :

./cli.py

Docker

With docker, you can get the whole dependencies enclosed in a container and use the comic_dl from your system.

You need an up and running Docker client running, follow the Docker Documentation.

Docker images are available here

Define a handy alias on your system with some docker tricks. This mounts the local directory under /directory in the container. This works on *NIX systems, and also under Windows Linux subsystem.

You can change the value of PGID and PUID with the value for the user needed in your download directory.

alias comic_dl="docker run -it --rm -e PGID=$(id -g) -e PUID=$(id -u) -v $(pwd):/directory:rw -w /directory ghcr.io/xonshiz/comic-dl:latest comic_dl -dd /directory"

Run it on your system. This actually starts a container on request and stop&delete it when finished.

usage: comicdl [-h] [--version] [-s SORTING] [-a] [-c]
               [-dd DOWNLOAD_DIRECTORY] [-rn RANGE] [--convert CONVERT]
               [--keep KEEP] [--quality QUALITY] [-i INPUT] [--comic]
               [-comic-search SEARCH_COMIC] [-comic-info COMIC_INFO]
               [--update UPDATE] [--print-index]
               [-ml MANGA_LANGUAGE] [-sc SKIP_CACHE] 
               [-p PASSWORD] [-u USERNAME] [-v]
[...]

Python Support

This script supports python 3. You can run this on python 2 as well, as long as you have all the dependencies installed.

Windows Binary

It is recommended that Windows users use this binary to save both, your head and time from installing all the dependencies.

You need to download and install Node.js and make sure it is in your Windows path (watch out for the tick box during install).

If you already have it, then you can download this binary and start using the script right off the bat : * Binary (x86) : Click Here

NOTE: This is a COMMAND LINE TOOL and will NOT work when you double-click it. So, download this .exe file and put it in some folder (Not in windows or some other restricted folder) and then hold down SHIFT KEY and right click anywhere on the screen and select "Open Command Window here". It'll open a CMD window for you. Now, you need to execute it and pass arguments to it like:

comic_dl.exe -i "https://readcomicsonline.ru/comic/irredeemable-omnibus-2012"

Read which argument does what in List of Arguments section.

List of Arguments

Currently, the script supports these arguments :

-h, --help                             Prints the basic help menu of the script and exits.
-i,--input                             Defines the input link to the comic/manga.
--print-index                          Prints the range index for links in the input URL
-V,--version                           Prints the VERSION and exits.
-u,--username                          Indicates username for a website.
-p,--password                          Indicates password for a website.
-v,--verbose                           Enables Verbose logging.
--sorting                              Sorts the download order.(VALUES = asc, ascending,old,new,desc,descending,latest,new)
-a, --auto                             Download new chapters automatically (needs config file!)
-c, --config                           Generates config file for autodownload function
-dd,--download-directory               Specifies custom download location for the comics/manga.
-rn,--range                            Selects the range of Chapters to download (Default = All) [ Ex : --range 1-10 (This will download first 10 episodes of a series)]
--convert                              Tells the script to convert the downloaded Images to PDF or anything else. (Supported Values : pdf, cbz) (Default : No) [By default, script will not convert anything.]
--keep                                 Tells the script whether to keep the files after conversion or not. (Supported : No, False) (Default : Yes/True) [By default, images will be kept even after conversion.]
--quality                              Tells the script about the image quality you want to download. (Supported Values : low/bad/worst/mobile/cancer) [By default, images will be downloaded in Highest Quality Available. No need to provide any option.]
-ml, --manga-language                  Selects the language for manga. 0 is English (Default) and 1 is Italian.
-sc, --skip-cache                      Forces to skip cache checking.
--comic                                Add this after -i if you are inputting a comic id or the EXACT comic name.
                                       [ Ex : -i "Deadpool Classic" --comic ]
-comic-search, --search-comic          Searches for a comic through the scraped data from ReadComicOnline.li
                                       [ Ex : -comic-search "Deadpool" ]
-comic-info, --comic-info              Lists all the information about the given comic (argument can be either comic id or the exact comic name).
                                       [ Ex : -comic-info "Deadpool Classic" ] or [ Ex : -comic-info 3865 ]
--update                               Updates the comic database for the given argument.
                                       [ Ex: --update "Deadpool Classic" ] or [ Ex: --update "https://readcomiconline.li/Comic/Deadpool-Classic" ]
-cookie, --cookie                      Passes a cookie to be used throughout the session.

Language Codes:

These codes correspond to the languages. So, just pass in these language codes, to download Manga/Comic in that language (only supported by few sites).

Language Code --> Language

0 --> English
1 --> Italian
2 --> Spanish
3 --> French
4 --> German
5 --> Portuguese
6 --> Turkish
7 --> Indonesian
8 --> Greek
9 --> Filipino
10 --> Polish
11 --> Thai
12 --> Malay
13  --> Hungarian
14 --> Romanian
15 -->  Arabic
16 --> Hebrew
17 --> Russian
18 --> Vietnamese
19 --> Dutch
20 --> Bengali
21 --> Persian
22 --> Czech
23 --> Brazilian
24 --> Bulgarian
25 --> Danish
26 --> Esperanto
27 --> Swedish
28 --> Lithuanian
29 --> Other

Note :

  1. Some websites like bato.to don't let you view some pages if you're not logged in. You'll have to create an account and pass the login information to the script via -p and -u arguments.
  2. Since omgbeaupeep is uh... well, you just need to pass the absolute chapter numbers

Core symbols most depended-on inside this repo

page_downloader
called by 54
comic_dl/globalFunctions.py
addOne
called by 43
comic_dl/globalFunctions.py
create_file_directory
called by 24
comic_dl/globalFunctions.py
multithread_download
called by 23
comic_dl/globalFunctions.py
conversion
called by 22
comic_dl/globalFunctions.py
prepend_zeroes
called by 17
comic_dl/globalFunctions.py
single_chapter
called by 3
comic_dl/sites/webtoons.py
single_chapter
called by 3
comic_dl/sites/mangaFox.py

Shape

Method 135
Class 30
Function 3

Languages

Python100%

Modules by API surface

comic_dl/readcomiconline/dataUpdate.py12 symbols
comic_dl/globalFunctions.py11 symbols
comic_dl/sites/japscan.py7 symbols
comic_dl/sites/acQQ.py7 symbols
comic_dl/configGenerator.py7 symbols
comic_dl/sites/readcomicOnlineli.py6 symbols
comic_dl/sites/omgBeauPeep.py6 symbols
comic_dl/sites/mangaReader.py6 symbols
comic_dl/sites/foolSlide.py6 symbols
comic_dl/sites/batoto.py6 symbols
comic_dl/sites/webtoons.py5 symbols
comic_dl/sites/stripUtopia.py5 symbols

For agents

$ claude mcp add comic-dl \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page