Extension

insert_link hentai.Extension(Enum)

Known file extensions used by nhentai images. Use the Page dataclass to access the file extension.

Enum

insert_link Enum.JPG

A JPG file extension enum.

insert_link Enum.PNG

A PNG file extension enum.

insert_link Enum.GIF

A GIF file extension enum.

Methods

insert_link Enum.convert(key: str) -> str

The API provides file extensions as single character strings. This helper method converts the key to its corresponding file extension.

            
                from hentai import Extension

                # .jpg
                print(Extension.convert('j'))