Python如何从MP3中获取id3?
本文实例讲述了Python从MP3文件获取id3的方法。分享给大家供大家参考。具体如下:
def getID3(filename): fp = open(filename, 'r') fp.seek(-128, 2) fp.read(3) # TAG iniziale title = fp.read(30) artist = fp.read(30) album = fp.read(30) anno = fp.read(4) comment = fp.read(28) fp.close() return {'title':title, 'artist':artist, 'album':album, 'anno':anno}
希望本文所述对大家的Python程序设计有所帮助。
本文地址:http://www.45fan.com/a/question/13698.html