From e13e4656409793107abcf1649ca16c0a14c38e92 Mon Sep 17 00:00:00 2001 From: Jim Rhotert Date: Tue, 4 Jun 2024 17:57:42 +0200 Subject: [PATCH] fix spaces in filenames --- scripts/crawl_concurrently.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/crawl_concurrently.py b/scripts/crawl_concurrently.py index 5028420..88b901d 100644 --- a/scripts/crawl_concurrently.py +++ b/scripts/crawl_concurrently.py @@ -131,8 +131,10 @@ def crawl_competition(uri, season, results, association, competition, from_date) "%Y-%m-%d-T%H+%M+%S" ) os.makedirs(data_path / f"{season}", exist_ok=True) + fn = data_path / f"{season}" / f"{a}_{c}_{time_str}.json" + fn = str(fn).replace(" ", "-") with open( - data_path / f"{season}" / f"{a}_{c}_{time_str}.json", + fn, "w+", ) as f: json.dump(data, f)