From 0d3b7b7c5ca01735cc6b0b075f1c9a2a8c2a244c Mon Sep 17 00:00:00 2001 From: harry Date: Fri, 5 Apr 2024 22:27:56 +0800 Subject: [PATCH] increase the timeout value --- app/services/material.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/material.py b/app/services/material.py index bc5efaa..56bf136 100644 --- a/app/services/material.py +++ b/app/services/material.py @@ -100,7 +100,7 @@ def save_video(video_url: str, save_dir: str = "") -> str: # if video does not exist, download it proxies = config.pexels.get("proxies", None) with open(video_path, "wb") as f: - f.write(requests.get(video_url, proxies=proxies, verify=False, timeout=(10, 180)).content) + f.write(requests.get(video_url, proxies=proxies, verify=False, timeout=(60, 240)).content) return video_path