views:

24

answers:

2

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

A: 

Dive Into Python has a great tutorial on extracting information from MP3 files, although you might need to do a bit of research for other file types.

alecwh
Sorry, nevermind, this solution uses ID3 tags.
alecwh
A: 

Use mutagen. It's a multi-format tag reading (and writing) library.

ΤΖΩΤΖΙΟΥ