Skip to content

kschlarman/genius_gram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Genius Gram

A simple (and stupid) Genius lyric scraper and remixer.

This is an unpublished ruby gem for generating remixed lyrics from any album cataloged on Genius. This gem scrapes the lyrics from Genius and creates a trigram to generate new sequences of words.

Here's an example from Hamilton:

you are the odds the gods
would put us all away someday
someday yeah youll blow us all
beware it goeth before the sun
comes up and the hope that
you write

Usage

require 'genius_gram'

album_url = "https://genius.com/albums/Lin-manuel-miranda/Hamilton-original-broadway-cast-recording"

gg = GeniusGram.new(album_url: album_url)
puts gg.make_me_a_song

If an album_url: is not provided, it will default to Hamilton.

You can also change the word count and line length:

puts gg.make_me_a_song(word_count: 100, line_length: 10)

Notes

Hamilton has 46 tracks. Tracks 31-46 are loaded asynchronously on the album's Genius page. Because this gem scrapes with Nokogiri, we're unable to capture the asynchronously loaded tracks.

This works better with some albums than others. Hamilton is ideal due to it's length and many repeating phrases (e.g. "my shot", "talk less smile more", "how does a ...").

About

A simple (and stupid) lyric parser and remixer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages