mirror of
https://github.com/beetbox/beets.git
synced 2026-02-11 09:54:31 +01:00
Merge pull request #480 from fortes/patch-1
Don't try to parse None as HTML when fetching lyrics
This commit is contained in:
commit
5e405f6b84
1 changed files with 3 additions and 0 deletions
|
|
@ -296,6 +296,9 @@ def scrape_lyrics_from_url(url):
|
|||
"""
|
||||
from bs4 import BeautifulSoup, Tag, Comment
|
||||
html = fetch_url(url)
|
||||
if not html:
|
||||
return None
|
||||
|
||||
soup = BeautifulSoup(html)
|
||||
|
||||
for tag in soup.findAll('br'):
|
||||
|
|
|
|||
Loading…
Reference in a new issue