diff options
Diffstat (limited to 'plugins/lhtranslation.py')
-rwxr-xr-x | plugins/lhtranslation.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/lhtranslation.py b/plugins/lhtranslation.py index ac32f5f..39540f0 100755 --- a/plugins/lhtranslation.py +++ b/plugins/lhtranslation.py @@ -36,7 +36,7 @@ if len(sys.argv) < 2: usage() def download_file(url, save_path): - with requests.get(url, headers=headers, stream=True) as response: + with requests.get(url, headers=headers, stream=True, timeout=30) as response: if not response.ok: return False with open(save_path, "wb") as file: @@ -73,7 +73,7 @@ def list_chapters(url, chapter_list_input): print(json.dumps(chapters)) def download_chapter(url, download_dir): - response = requests.get(url, headers=headers) + response = requests.get(url, headers=headers, timeout=30) response.raise_for_status() in_progress_filepath = os.path.join(download_dir, ".in_progress") |