Hey Songs with "&" doesn't work, managed to fix it with chatgpt tho XD. here is the explanation:
Chatgpt:
"One common reason for this issue is that the & symbol has a special meaning in certain contexts, particularly in HTML or some other markup languages where it represents the start of an HTML entity. To ensure that it displays correctly, you might need to escape it properly before displaying it.
You can do this by replacing & with & in your output string before displaying it. Here's how you can modify your get_current_song function to include this:"
Hey Songs with "&" doesn't work, managed to fix it with chatgpt tho XD. here is the explanation:
Chatgpt: "One common reason for this issue is that the & symbol has a special meaning in certain contexts, particularly in HTML or some other markup languages where it represents the start of an HTML entity. To ensure that it displays correctly, you might need to escape it properly before displaying it.
You can do this by replacing & with & in your output string before displaying it. Here's how you can modify your get_current_song function to include this:"
`def get_current_song(sp): try: current_song = sp.currently_playing() song_name = current_song['item']['name'] song_artist = current_song['item']['artists'][0]['name']
Replace '&' with '&'
`
this modification worked perfectly for me