From 5a6135411298668359e5cd8c96475359d439add4 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Mon, 14 Nov 2022 16:23:17 +0300 Subject: [PATCH] slash replace for trubleshoting download --- src/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.py b/src/utils.py index 36227d7..c2eee90 100644 --- a/src/utils.py +++ b/src/utils.py @@ -17,6 +17,6 @@ def download_track(url, name=None): if not name: name = url.split(r'/')[-1] - with open(name, 'wb') as f: + with open(name.replace(r'/', '_'), 'wb') as f: f.write(r.content) return name