return None for lyrics if Tekstowo fails to extract lyrics

I experienced a failure to parse Tekstowo for song lyrics. 

This patch allowed the lyrics plugin to fetch the lyrics from another provider as opposed to failing.
This commit is contained in:
Martin Atukunda 2021-07-01 09:39:42 +03:00 committed by GitHub
parent eadeead565
commit efcc5b3fae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -483,7 +483,10 @@ class Tekstowo(Backend):
if not soup:
return None
return soup.find("div", class_="song-text").get_text()
c = soup.find("div", class_="song-text")
if c:
return c.get_text()
return None
def remove_credits(text):