johnwmillr / LyricsGenius

Download song lyrics and metadata from Genius.com 🎶🎤
http://www.johnwmillr.com/scraping-genius-lyrics/
MIT License
898 stars 159 forks source link

`Song.save_lyrics()` method ignores the `sanitize` parameter #130

Closed AdamSpannbauer closed 4 years ago

AdamSpannbauer commented 4 years ago

Describe the bug The Song.save_lyrics() method ignores the sanitize parameter. It prints the correct name when verbose=True, but the sanitize param isn't passed to the Song.to_json()/Song.to_text() methods so the filename is still sanitized by default.

Expected behavior Setting sanitize=False when using Song.save_lyrics() should save to the input filename without changing the path in anyway.

To Reproduce

import lyricsgenius

save_path = "data/path.json"

genius = lyricsgenius.Genius("my_client_access_token_here")
song = genius.search_song(r"To You", "Andy Shauf")

# Will print correct file name, 
# but save to 'datapath.json' rather than 'data/path.json'
song.save_lyrics(save_path, sanitize=False)
melaniewalsh commented 4 years ago

Just wanted to say that I'm experiencing the same issue and would love to see PR #131 merged! Thanks, @AdamSpannbauer

AdamSpannbauer commented 4 years ago

closed by #131