From 0824ccb85f3b02d6afd1090c8382b6fdabcd3c82 Mon Sep 17 00:00:00 2001 From: Filipe Fortes Date: Wed, 18 Dec 2013 07:37:01 -0800 Subject: [PATCH] Don't try to parse None as HTML when fetching lyrics Fixes #479 --- beetsplug/lyrics.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py index 530bd4f67..28949b307 100644 --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -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'):