Skip to content

Commit

Permalink
Fixes lyrics returning blank by modifying regex search. (#284)
Browse files Browse the repository at this point in the history
* Fixes lyrics returning blank by modifying regex search.

* Update package version to 3.1.1

---------

Co-authored-by: FryanO <[email protected]>
Co-authored-by: John William Ruth Miller <[email protected]>
  • Loading branch information
3 people authored Dec 13, 2024
1 parent d4015f3 commit fc7e141
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lyricsgenius/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
__url__ = 'https://github.com/johnwmillr/LyricsGenius'
__description__ = 'A Python wrapper around the Genius API'
__license__ = 'MIT'
__version__ = '3.0.1'
__version__ = '3.1.1'
2 changes: 1 addition & 1 deletion lyricsgenius/genius.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def lyrics(self, song_id=None, song_url=None, remove_section_headers=False):
)

# Determine the class of the div
divs = html.find_all("div", class_=re.compile("^lyrics$|Lyrics__Container"))
divs = html.find_all("div", class_=re.compile(r"^Lyrics-\w{2}.\w+.[1]|Lyrics__Container"))
if divs is None or len(divs) <= 0:
if self.verbose:
print("Couldn't find the lyrics section. "
Expand Down

0 comments on commit fc7e141

Please sign in to comment.