Your approach with Clicknium for handling dynamically loaded content is solid, especially with index-based iteration and auto-scrolling. However, scraping Spotify directly can raise issues with their terms of service, so for long-term or production use, the official API is usually the safer option.

If your goal is to reuse playlists outside Spotify, one practical approach is converting track data into formats like M3U. While Spotify
...