python - How to access the release date or year from an mp3 file with eyed3 and python2.7 -
i'm trying access mp3 tags release year mp3 file's album, stored in id3v2 tags under tyer.
i found out attributes track_num located in
class eyed3.core.tag
then python command looks this:
audiofile = eyed3.load(mp3_file) track_num = audiofile.tag.track_num[0]
now year located in
class eyed3.core.date(year,...)
so thougt be:
year = audiofile.date.year
but i'm unfortunately wrong...
msg: attributeerror: 'mp3audiofile' object has no attribute 'date'
does know how works? or, more generic question: how can of available attributs?
my plattform windows 10 pro.
thanks
it's quite strange had post first before find information myself:-)
it's in class eyed3.id3.tag.tag
and named: getbestdate()
the whole necessary code then:
import eyed3 mp3_file = "the_file_path" audiofile = eyed3.load(mp3_file) year = audiofile.tag.getbestdate()
for more information see eyed3.pdf file
https://media.readthedocs.org/pdf/eyed3/latest/eyed3.pdf
thanks
Comments
Post a Comment