elmoiv / azapi

Get Lyrics from AZLyrics.com like a Boss ~(0_0)~
GNU General Public License v3.0
121 stars 12 forks source link

Error during getLyrics() #10

Closed SimonIT closed 3 years ago

SimonIT commented 3 years ago

Describe the bug Exception thrown during loading the lyrics.

Traceback (most recent call last):
  File "<input>", line 4, in <module>
  File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\azapi\azapi.py", line 90, in getLyrics
    self.lyrics = lyrics.strip()
AttributeError: 'NoneType' object has no attribute 'strip'

To Reproduce Steps to reproduce the behavior:

api = azapi.AZlyrics('duckduckgo', accuracy=0.5)

api.artist = "Glass Animals"

api.getLyrics(url="http://www.azlyrics.com/lyrics/glassanimals/homemovie1994.html")

Expected behavior It seem that no lyrics is available but the page exist. Maybe return None?

elmoiv commented 3 years ago

I updated azapi with new fixes. One-liner lyrics can now be fetched. Now pip install azapi==3.0.5.

If your problem is solved, kindly close this issue :)

P.S: you can now get lyrics with direct url with no need to add title or artist

SimonIT commented 3 years ago

Fixed, thank you!