elmoiv/azapi

Error during getLyrics()

SimonIT opened this issue · 2 comments

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?

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

Fixed, thank you!