Introduction
Have you ever wanted to migrate your carefully curated NetEase Music (网易云音乐) playlist to Spotify? In this post, I’ll walk you through a Python solution that helps bridge these two platforms, making your music migration seamless and efficient.
The Challenge
When migrating playlists between NetEase Music and Spotify, we face several challenges:
- Different Text Formats: NetEase Music exports songs in “Title - Artist” format, while Spotify’s bulk import tool expects “Artist - Title”
- Chinese Artist Names: Many Chinese artists have both Chinese and English names, making matching difficult
- Encoding Issues: Handling Chinese characters correctly in text processing
- Multiple Artists: Proper handling of songs with multiple artists
The Solution Pipeline
Here’s our three-step solution:
- Extract playlist from NetEase Music using NetEase2Text
- Process the text using our Python script
- Import the processed list into Spotify using Spotlistr
The Code
Let’s break down our Python solution that handles the text processing step:
|
|
Key Components
- Artist Name Mapping
- We maintain a dictionary of Chinese artist names and their English equivalents
- This helps Spotify better match the artists
|
|
- Format Detection
- Detect whether text contains Chinese characters
- Handle mixed language content appropriately
|
|
- Line Processing
- Parse each song entry
- Handle potential formatting errors
|
|
How to Use
-
Extract Your Playlist
- Go to NetEase2Text
- Input your NetEase Music playlist URL
- Copy the extracted song list
-
Process the List
- Save the copied list to
paste.txt
- Run the Python script:
1
python song_formatter.py
- Find the processed list in
formatted_songs.txt
- Save the copied list to
-
Import to Spotify
- Go to Spotlistr
- Paste the contents of
formatted_songs.txt
- Click “Search for Songs”
Example Results
Before:
|
|
After:
|
|
Tips for Better Results
- Expand Artist Mappings: Add more Chinese-English artist name mappings to improve match rates
- Handle Special Cases: Watch for live versions, remixes, and featuring artists
- Review Results: Check Spotify’s matches and adjust manually if needed
Limitations and Future Improvements
- Not all Chinese songs are available on Spotify
- Some artist names might need manual adjustment
- Could add support for more input formats
- Potential to add direct Spotify API integration
Conclusion
This solution significantly streamlines the process of migrating playlists from NetEase Music to Spotify. While it may not be perfect due to platform differences and availability issues, it automates much of the tedious work involved in playlist migration.
Feel free to contribute to the project or suggest improvements!
The full code is available here.
Note: Remember to handle your music platform credentials securely and respect platform-specific terms of service when migrating content.