Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove Netease Music Tags
'''
删除网易云音乐嵌在音乐里面的参数。使其将音乐文件识别为外部文件。
(目前只是直接删除COMM标签。)
Requirements:
Mutagen
License: MIT
'''
from mutagen.id3 import ID3
import mutagen
import os
import fnmatch
path = "/Users/Blueset/Music/Vocaloid"
mp3s = [os.path.join(dirpath, f)
for dirpath, dirnames, files in os.walk(path)
for f in fnmatch.filter(files, '*.mp3')]
for path in mp3s:
try:
a = ID3(path)
a.delall("COMM")
except mutagen.id3._util.ID3NoHeaderError as e:
print(e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment