From c2763f5f6b7329ef196b76d668d8a2afa936c508 Mon Sep 17 00:00:00 2001 From: Jali Date: Sat, 7 May 2022 20:18:06 +0200 Subject: [PATCH] use urllib to un-escape quotes --- scraper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scraper.py b/scraper.py index 84abe24..fc9051f 100755 --- a/scraper.py +++ b/scraper.py @@ -8,7 +8,7 @@ import mutagen.id3 from mutagen.id3 import ID3, TIT2, TIT3, TALB, TRCK, TYER import os from shutil import copyfile -from urllib import unquote +import urllib import xml.etree.cElementTree as xml @@ -40,7 +40,7 @@ def copy_file(track: Track, targetFolder) -> str: """ Copies a track from its source to the destination folder """ - path = unquote(track.Location[7:]) + path = urllib.parse.unquote(track.Location[7:]) dst = os.path.join(targetFolder, os.path.basename(path)) if (os.path.exists(path)): print('Copying file {0}'.format(path))