diff options
Diffstat (limited to 'plugins/mangaplus.py')
-rwxr-xr-x | plugins/mangaplus.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/mangaplus.py b/plugins/mangaplus.py index 05567fc..7dee0d8 100755 --- a/plugins/mangaplus.py +++ b/plugins/mangaplus.py @@ -173,7 +173,7 @@ def download_file(url, page, save_path): block_size_in_bytes = len(key_stream) index = 0 - with requests.get(url, stream=True) as response: + with requests.get(url, stream=True, timeout=30) as response: if not response.ok: return False with open(save_path, "wb") as file: @@ -183,7 +183,7 @@ def download_file(url, page, save_path): file.write(content) index += len(chunk) else: - with requests.get(url, stream=True) as response: + with requests.get(url, stream=True, timeout=30) as response: if not response.ok: return False with open(save_path, "wb") as file: @@ -205,7 +205,7 @@ def list_chapters(url, chapter_list_input): url = api_manga_url.format(manga_id) - response = requests.get(url) + response = requests.get(url, timeout=30) response.raise_for_status() resp = MangaplusResponse.loads(response.content) @@ -254,7 +254,7 @@ def download_chapter(url, download_dir): url = api_chapter_url.format(manga_id) - response = requests.get(url) + response = requests.get(url, timeout=30) response.raise_for_status() in_progress_filepath = os.path.join(download_dir, ".in_progress") |