mirror of
https://github.com/beetbox/beets.git
synced 2026-02-26 09:11:32 +01:00
lyrics: fix a bug where the lyricswiki fetcher would try to unescape an empty (None) response and crash
This commit is contained in:
parent
078a0702d3
commit
1dd6739218
1 changed files with 4 additions and 3 deletions
|
|
@ -347,10 +347,11 @@ class LyricsWiki(SymbolsReplaced):
|
|||
# Get the HTML fragment inside the appropriate HTML element and then
|
||||
# extract the text from it.
|
||||
html_frag = extract_text_in(html, u"<div class='lyricbox'>")
|
||||
lyrics = _scrape_strip_cruft(html_frag, True)
|
||||
if html_frag:
|
||||
lyrics = _scrape_strip_cruft(html_frag, True)
|
||||
|
||||
if lyrics and 'Unfortunately, we are not licensed' not in lyrics:
|
||||
return lyrics
|
||||
if lyrics and 'Unfortunately, we are not licensed' not in lyrics:
|
||||
return lyrics
|
||||
|
||||
|
||||
class LyricsCom(Backend):
|
||||
|
|
|
|||
Loading…
Reference in a new issue