Skip to content

Commit

Permalink
Avoid BeautifulSoup deprecation warning
Browse files Browse the repository at this point in the history
The `text` parameter to `SoupStrainer` was renamed to `string` in 2015
(4.4.0) and started producing a warning this year (4.11.0).
https://bazaar.launchpad.net/%7Eleonardr/beautifulsoup/bs4/view/head:/CHANGELOG
  • Loading branch information
sampsyo committed Aug 21, 2022
1 parent 8c84bae commit 8cb3143
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion beetsplug/lyrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,8 @@ def is_text_notcode(text):
html = _scrape_merge_paragraphs(html)

# extract all long text blocks that are not code
soup = try_parse_html(html, parse_only=SoupStrainer(text=is_text_notcode))
soup = try_parse_html(html,
parse_only=SoupStrainer(string=is_text_notcode))
if not soup:
return None

Expand Down

0 comments on commit 8cb3143

Please sign in to comment.