From a2a54abf600bb8c99b362ac011da58f4f4aacee9 Mon Sep 17 00:00:00 2001 From: "matthias@arch" Date: Wed, 29 Sep 2021 16:17:22 +0200 Subject: [PATCH] Removing special characters from artist while creating url --- nicole/nicole.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nicole/nicole.py b/nicole/nicole.py index 9f1d1e5..9287f58 100644 --- a/nicole/nicole.py +++ b/nicole/nicole.py @@ -102,6 +102,7 @@ class Nicole: # remove spaces, from the title for c in [' ', '-', ',', '.', '\'', '"', '°', '`', '´', '/', '!', '?', '#', '*']: title = title.replace(c, '') + artist = artist.replace(c, '') # replace some stuff old = ['ä', 'ö', 'ü', '&'] @@ -109,6 +110,7 @@ class Nicole: for i in range(len(old)): title = title.replace(old[i], new[i]) + artist = artist.replace(old[i], new[i]) return "https://azlyrics.com/lyrics/" + artist + '/' + title + ".html"