From e079febe792ef82debefddc3357c8b6197c49955 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Mon, 15 May 2023 13:33:59 +0100 Subject: [PATCH] Ensure output directory exists in requests downloader --- devine/core/downloaders/requests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/devine/core/downloaders/requests.py b/devine/core/downloaders/requests.py index b961de8..b837716 100644 --- a/devine/core/downloaders/requests.py +++ b/devine/core/downloaders/requests.py @@ -60,6 +60,7 @@ def requests( last_speed_refresh = time.time() for url, out_path in uri: + out_path.parent.mkdir(parents=True, exist_ok=True) stream = session.get(url, stream=True) file_size = int(stream.headers["Content-Length"]) with open(out_path, "wb") as f: