johnwmillr / LyricsGenius

Download song lyrics and metadata from Genius.com 🎶🎤
http://www.johnwmillr.com/scraping-genius-lyrics/
MIT License
892 stars 158 forks source link

AttributeError: 'Song' object has no attribute 'year.' #200

Closed zahrahosseini99 closed 3 years ago

zahrahosseini99 commented 3 years ago

Hi, I was trying to get a release date of a song but it shows the below error: >>> song_year = song.year Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'Song' object has no attribute 'year.' I saw that 49 Years of Lyrics in your examples used this method. Is this remove in later versions? or just the name of that changed? If it was available in the previous version, could you please give me the version number? Many thanks for considering my request.

allerter commented 3 years ago

Hi. Yes, the Song.year attribute has been removed in version 3.0.0 and replaced by Song.release_date (which has its issue at the moment with a fix waiting to be merged at #182). The aforementioned Song.year is available in all versions below 3.0.0 and I suggest using 2.0.2 until version 3.0.1 or higher is available.

allerter commented 3 years ago

Duplicate of #187. Closing.

johnwmillr commented 3 years ago

The #182 has been merged to master.