Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Commit

Permalink
updated download(...) type hint; updated KFSmedia
Browse files Browse the repository at this point in the history
  • Loading branch information
9-FS committed Nov 8, 2023
1 parent 01d6704 commit 4dc83d3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/Hentai.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down

0 comments on commit 4dc83d3

Please sign in to comment.