Skip to content

Commit

Permalink
Add timeout to requests
Browse files Browse the repository at this point in the history
  • Loading branch information
debakarr committed Dec 21, 2023
1 parent cc985e1 commit 8ac4fbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kisskh_downloader/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def download_subtitles(
for subtitle in subtitles:
logger.info(f"Downloading {subtitle.label} sub...")
extension = os.path.splitext(urlparse(subtitle.src).path)[-1]
response = requests.get(subtitle.src)
response = requests.get(subtitle.src, timeout=60)
output_path = Path(f"{filepath}.{subtitle.land}{extension}")
output_path.write_bytes(response.content)
if decrypter is not None:
Expand Down

0 comments on commit 8ac4fbf

Please sign in to comment.