I believe you can use Spotify API [^1] to get that list and then reformat it in any way you would prefer and save it to a file.
Actually, I have this on my TODO list for a long time, maybe someday I'll finally implement it.
[^1]: https://developer.spotify.com/documentation/web-api/referenc...