Skip to content

Automagically check if songs have the 7 dirty words you can't say on the air

Notifications You must be signed in to change notification settings

orioncrocker/isitclean

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

isitclean, fork of LyricsGenius by johnwmillr

Build Status PyPI version Python version

lyricsgenius provides a simple interface to the song, artist, and lyrics data stored on Genius.com.

isitclean utilizes lyricsgenius to quickly find "clean" songs by a specific artist or album.

Setup

Before using this package you'll need to sign up for a (free) account that authorizes access to the Genius API. The Genius account provides a client_access_token that is required by the package. See the Usage section below for examples. By default, isitclean imports a config file with a variable named client_access_token. Create your own config.py and store your unique client access token from Genius there.

Installation

lyricsgenius requires Python 3.

Use pip to install the package from PyPI:

NOT YET IMPLEMENTED
pip install isitclean

Or, clone the latest version of the package from GitHub:

git clone https://github.com/orioncrocker/isitclean

Usage

Search for song with arguments 'song' and 'artist'

python3 -m isitclean song "Feed The Horses" "Thank You Scientist"

Search for an artist, by default most popular songs will be fetched

python3 -m isitclean artist "Smashing Pumpkins"

Search for ten songs by 'Protest The Hero'

python3 -m isitclean artist "Protest The Hero" --max-songs 10

Import the package and search for songs by a given artist:

import isitclean
genius = lyricsgenius.Genius("my_client_access_token_here")
artist = genius.search_artist("Andy Shauf", max_songs=3, sort="title")
print(artist.songs)

Search for a single song by the same artist:

song = genius.search_song("To You", artist.name)
print(song.lyrics)

Add the song to the artist object:

artist.add_song(song)

Save the artist's songs to a JSON file:

artist.save_lyrics()

There are various options configurable as parameters within the Genius class:

genius.clean = False # Doesn't print if songs have profanities or not
genius.verbose = False # Turn off status messages
genius.remove_section_headers = True # Remove section headers (e.g. [Chorus]) from lyrics when searching
genius.skip_non_songs = False # Include hits thought to be non-songs (e.g. track lists)
genius.excluded_terms = ["(Remix)", "(Live)"] # Exclude songs with these words in their title

Planned features:

Search by album rather than limited to just song or artist search

python3 -m isitclean album "Float" "Aesop Rock"

Example projects from lyricsgenius author johnwmillr

About

Automagically check if songs have the 7 dirty words you can't say on the air

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%