manga_dl.entities package

Submodules

manga_dl.entities.Chapter module

class manga_dl.entities.Chapter.Chapter(url: str, language: str, series_name: str, chapter_number: str, destination_dir: str, _format: str, page_load_callback: Callable[[Chapter, str], List[str]], title: Optional[str] = None, group: Optional[str] = None)

Bases: object

Class that models a manga chapter

__init__(url: str, language: str, series_name: str, chapter_number: str, destination_dir: str, _format: str, page_load_callback: Callable[[Chapter, str], List[str]], title: Optional[str] = None, group: Optional[str] = None)

Initializes the manga chapter :param url: The URL used to fetch page image URLs :param language: The language of the chapter :param series_name: The name of the series :param chapter_number: The chapter number of this chapter :param destination_dir: The destination directory in which to store

downloaded files by default

Parameters
  • _format – The format in which to store the chapter when downloading by default

  • title – The title of the chapter

  • group – The group that scanlated this chapter

  • page_load_callback

add_additional_url(url: str)

Adds an additional URL. Useful for multi-part chapters :param url: The URL to add :return: None

download(file_path_override: Optional[str] = None, format_override: Optional[str] = None) → str

Downloads the chapter to a local file or directory :param file_path_override: Overrides the automatically generated

destination file path

Parameters

format_override – Overrides the class-wide format

Returns

The path to the downloaded chapter file/directory

property is_special
Returns

Whether or not this is a ‘special’ chapter (Omake etc)

property macro_chapter
Calculates the ‘macro’ chapter number. For example:

12 -> 12 15.5 -> 15 EX4 -> 4

Returns

The macro chapter number

property micro_chapter
Calculates the ‘micro’ chapter number. For example:

12 -> 0 15.5 -> 5 EX4 -> 0

Returns

The micro chapter number

property name
Returns

The name of the chapter

property pages

Lazy-loads the URLs of the chapter’s page images :return: The list of page images, in the correct order

Module contents