mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
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:
parent
eadeead565
commit
efcc5b3fae
1 changed files with 4 additions and 1 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue