johnwmillr / LyricsGenius

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

Sanitize default filenames when saving #88

Closed johnwmillr closed 5 years ago

johnwmillr commented 5 years ago

This PR resolves #87.

If Genius returned songs with invalid filename characters (e.g. "\") in the song name, the file could not be saved when using the default filename.

This PR adds a sanitize_filename function to the Song class that removes illegal characters from filenames. The sanitize function is NOT applied when the user supplies their own filename.

victoriahuynh commented 5 years ago

Thanks for the quick fix!