diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py index 125d1330d5..f0290f74a8 100644 --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -437,8 +437,14 @@ def parse_search_results(self, html): except HTMLParseError: return None - song_row = html.find("div", class_="content"). \ - find_all("div", class_="box-przeboje")[0] + song_rows = html.find("div", class_="content"). \ + find("div", class_="card"). \ + find_all("div", class_="box-przeboje") + + if not song_rows: + return None + + song_row = song_rows[0] if not song_row: return None diff --git a/docs/changelog.rst b/docs/changelog.rst index 6aca3ac8e3..88338f7a79 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -353,6 +353,8 @@ Fixes: :bug:`3870` * Allow equals within ``--set`` value when importing. :bug:`2984` +* :doc:`/plugins/lyrics`: Fix crashes for Tekstowo false positives + :bug:`3904` For plugin developers: