如何在 python 中获取除正则表达式和 id3 标签之外的音频文件元数据
现在我正在编写一个脚本,需要从所有这些音频文件中提取艺术家、专辑和标题。目前,我首先尝试使用正则表达式提取它们,如果文件命名不好,我会采取缓慢的路线并尝试使用 id3 标签获取信息。如果两者都不起作用,这些文件就会被忽略。
不过,id3 标签仅适用于 mp3 文件,所以我想知道是否有人知道任何好的 id3 等效标签读取 python 库,用于其他一些流行的音频文件扩展名。
谢谢! 授予
Right now I'm working on a script that needs to extract the artist, album, and title from all these audio files. At the moment, I first try to extract them with regular expressions, and if the files aren't named nicely I go the slow route and try to get the information with id3 tags. The files then just get ignored if neither works.
Id3 tags only work with mp3 files though, so I was wondering if anyone knew any good id3 equivalent tag reading python libraries for some of the other popular audio file extensions.
Thanks!
Grant
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用诱变剂。它是一个多格式标签读取(和写入)库。
Use mutagen. It's a multi-format tag reading (and writing) library.