diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-04-21 01:14:28 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-06 07:12:34 +0200 |
commit | 16f257a85a40a8da50cef1fa6ffce4e2da6da8b8 (patch) | |
tree | cfb0d9c739d1e282621f5e5585a004ea624f551e | |
parent | 6f1afa9d76e9c2611a8025fb067d7ee14518dc18 (diff) |
Fix incorrect response.ok call
-rwxr-xr-x | plugins/lhtranslation.py | 2 | ||||
-rwxr-xr-x | plugins/mangadex.py | 2 | ||||
-rwxr-xr-x | plugins/manganelo.py | 2 | ||||
-rwxr-xr-x | plugins/mangaplus.py | 4 | ||||
-rwxr-xr-x | plugins/mangawindow.py | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/plugins/lhtranslation.py b/plugins/lhtranslation.py index 193e35e..f07a793 100755 --- a/plugins/lhtranslation.py +++ b/plugins/lhtranslation.py @@ -32,7 +32,7 @@ if len(sys.argv) < 2: def download_file(url, save_path): with requests.get(url, stream=True) as response: - if not response.ok(): + if not response.ok: return False with open(save_path, "wb") as file: for chunk in response.iter_content(chunk_size=8192): diff --git a/plugins/mangadex.py b/plugins/mangadex.py index 3c70b59..be0e2ce 100755 --- a/plugins/mangadex.py +++ b/plugins/mangadex.py @@ -33,7 +33,7 @@ if len(sys.argv) < 2: def download_file(url, save_path): with requests.get(url, stream=True) as response: - if not response.ok(): + if not response.ok: return False with open(save_path, "wb") as file: for chunk in response.iter_content(chunk_size=8192): diff --git a/plugins/manganelo.py b/plugins/manganelo.py index 3cb3118..3ce51b8 100755 --- a/plugins/manganelo.py +++ b/plugins/manganelo.py @@ -33,7 +33,7 @@ if len(sys.argv) < 2: def download_file(url, save_path): file_size = 0 with requests.get(url, stream=True) as response: - if not response.ok(): + if not response.ok: return 0 with open(save_path, "wb") as file: for chunk in response.iter_content(chunk_size=8192): diff --git a/plugins/mangaplus.py b/plugins/mangaplus.py index 3797d14..23bae04 100755 --- a/plugins/mangaplus.py +++ b/plugins/mangaplus.py @@ -182,7 +182,7 @@ def download_file(url, page, save_path): index = 0 with requests.get(url, headers=headers, stream=True) as response: - if not response.ok(): + if not response.ok: return False with open(save_path, "wb") as file: for chunk in response.iter_content(chunk_size=8192): @@ -192,7 +192,7 @@ def download_file(url, page, save_path): index += len(chunk) else: with requests.get(url, headers=headers, stream=True) as response: - if not response.ok(): + if not response.ok: return False with open(save_path, "wb") as file: for chunk in response.iter_content(chunk_size=8192): diff --git a/plugins/mangawindow.py b/plugins/mangawindow.py index 49fca0a..b5f5bf8 100755 --- a/plugins/mangawindow.py +++ b/plugins/mangawindow.py @@ -33,7 +33,7 @@ if len(sys.argv) < 2: def download_file(url, save_path): with requests.get(url, stream=True) as response: - if not response.ok(): + if not response.ok: return False with open(save_path, "wb") as file: for chunk in response.iter_content(chunk_size=8192): |