mirror of
https://github.com/beetbox/beets.git
synced 2025-12-21 16:13:38 +01:00
Remove footer text from Genius lyrics
This commit is contained in:
parent
3a8520e30a
commit
414760282b
2 changed files with 8 additions and 2 deletions
|
|
@ -419,11 +419,17 @@ class Genius(Backend):
|
||||||
lyrics_div = verse_div.parent
|
lyrics_div = verse_div.parent
|
||||||
for br in lyrics_div.find_all("br"):
|
for br in lyrics_div.find_all("br"):
|
||||||
br.replace_with("\n")
|
br.replace_with("\n")
|
||||||
|
|
||||||
ads = lyrics_div.find_all("div",
|
ads = lyrics_div.find_all("div",
|
||||||
class_=re.compile("InreadAd__Container"))
|
class_=re.compile("InreadAd__Container"))
|
||||||
for ad in ads:
|
for ad in ads:
|
||||||
ad.replace_with("\n")
|
ad.replace_with("\n")
|
||||||
|
|
||||||
|
footers = lyrics_div.find_all("div",
|
||||||
|
class_=re.compile("Lyrics__Footer"))
|
||||||
|
for footer in footers:
|
||||||
|
footer.replace_with("")
|
||||||
|
|
||||||
return lyrics_div.get_text()
|
return lyrics_div.get_text()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,8 @@ Bug fixes:
|
||||||
* :doc:`plugins/web`: Fix handling of "query" requests. Previously queries
|
* :doc:`plugins/web`: Fix handling of "query" requests. Previously queries
|
||||||
consisting of more than one token (separated by a slash) always returned an
|
consisting of more than one token (separated by a slash) always returned an
|
||||||
empty result.
|
empty result.
|
||||||
* :doc:`plugins/lyrics`: Fixed an issue with the Tekstowo.pl scraper where some
|
* :doc:`plugins/lyrics`: Fixed issues with the Tekstowo.pl and Genius
|
||||||
non-lyrics content got included in the lyrics
|
backends where some non-lyrics content got included in the lyrics
|
||||||
|
|
||||||
For packagers:
|
For packagers:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue