@j0r6it0/lyricsfinder

1.2.2 • Public • Published

@j0r6it0/lyricsfinder

A simple module to get the lyrics of a song. It uses Genius as the main option and falls back to Google if no song is found. If nothing is found, it returns false. Song titles are automatically 'cleaned' for a more reliable search. ("Passenger | Let Her Go (Official Video)" will be transformed to "passenger let her go"). Should work with songs in every language.

Install

npm i @j0r6it0/lyricsfinder

Usage

const findLyrics = require('@j0r6it0/lyricsfinder');


const lyrics = await findLyrics("Alan Walker Alone", { useGenius: true, useGoogle: true });

if (lyrics == false) return console.log("Lyrics not found");

console.log(lyrics.lyrics);
console.log(lyrics.artist); // Only available when getting the song from Genius, otherwise returns undefined
console.log(lyrics.title); // Only available when getting the song from Genius, otherwise returns undefined
console.log(lyrics.thumbnail); // Only available when getting the song from Genius, otherwise returns undefined

Options

geniusToken: Genius Api Access Token [Optional]
useGenius: true/false [Optional] (Default: true)
useGoogle: true/false [Optional] (Default: true)

Package Sidebar

Install

npm i @j0r6it0/lyricsfinder

Weekly Downloads

0

Version

1.2.2

License

ISC

Unpacked Size

5.53 kB

Total Files

3

Last publish

Collaborators

  • j0r6it0