diff --git a/poetry.lock b/poetry.lock index caebd72..d306a26 100644 --- a/poetry.lock +++ b/poetry.lock @@ -281,13 +281,13 @@ files = [ [[package]] name = "kfsmedia" -version = "2.3.0" +version = "2.3.1" description = "" optional = false python-versions = ">=3.11.0,<4.0.0" files = [ - {file = "kfsmedia-2.3.0-py3-none-any.whl", hash = "sha256:d4a5caeeef0e74800f8e829fd0473ed26ef4d25fd80daa20d17e6643d157d104"}, - {file = "kfsmedia-2.3.0.tar.gz", hash = "sha256:126deaa054ed0027b8e11cff99d4b185b7827d8ddd3aac35eedb45f49ce8ab38"}, + {file = "kfsmedia-2.3.1-py3-none-any.whl", hash = "sha256:b7cc5cf681b23e5122abb1c98f36a85b42ad061fdd5fcda289ada2f78318669e"}, + {file = "kfsmedia-2.3.1.tar.gz", hash = "sha256:3839099c955b117fa49ee97536687594e01836d321b7c23cbe4583e3a4f7aecc"}, ] [package.dependencies] diff --git a/pyproject.toml b/pyproject.toml index 5825d6f..51d30b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ license = "MIT" name = "x" # can't leave empty because of bug with `poetry install` from poetry.lock file readme = "readme.md" repository = "https://github.com/9-FS/2022-10-23-nHentai-to-PDF-Server" -version = "2.3.5" +version = "2.3.6" [tool.poetry.dependencies] kfsconfig = "^1.0.0" diff --git a/requirements.txt b/requirements.txt index 65a6bc1..0987058 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ kfsconfig==1.0.2 ; python_full_version >= "3.11.0" and python_full_version < "4. kfsfstr==1.1.0 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0" kfslog==1.0.1 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0" kfsmath==1.0.1 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0" -kfsmedia==2.3.0 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0" +kfsmedia==2.3.1 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0" kfssleep==1.0.1 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0" lxml==4.9.3 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0" packaging==23.2 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0" diff --git a/src/Hentai.py b/src/Hentai.py index d67a05a..8583e00 100644 --- a/src/Hentai.py +++ b/src/Hentai.py @@ -172,7 +172,7 @@ def _increment_fails(self, image_list: list[str]) -> None: return - def download(self, dest_path: str) -> list[PIL.Image.Image]: + def download(self, dest_path: str) -> bytes: """ Downloads the hentai, saves it at f"./{DEST_PATH}{self.ID} {self.title}.pdf", and also returns it in case needed. @@ -194,7 +194,7 @@ def download(self, dest_path: str) -> list[PIL.Image.Image]: "p": ".png", } pages_URL: list[str]=[] # URL to individual pages to download - PDF: list[PIL.Image.Image] # finished PDF + PDF: bytes # finished PDF PDF_filepath: str # where to save downloaded result, ID title pdf, but title maximum 140 characters and without illegal filename characters TIMEOUT=100 # timeout for downloading images TITLE_CHARACTERS_FORBIDDEN: str="\\/:*?\"<>|\t\n" # in title forbidden characters