0.0.3 • Published 4 years ago
spotify-lyrics-api v0.0.3
spotify-lyrics-api
A package to retrieve 🎵 time-stamped lyrics from Spotify.
📖 Usage
const { Lyrics } = require('spotify-lyrics-api');
let lyrics = new Lyrics(
path.join(__dirname, 'cookies.txt')
);
console.log(await lyrics.fromName('Lights Up'));
console.log(await lyrics.fromID('5aJEh9Oqdz7PRLKTpH25pB'));
Result
[
{
"time": 19090,
"words": "What do you mean?"
},
{
"time": 22050,
"words": "I'm sorry by the way"
},
{
"time": 25790,
"words": "I'm never coming back down"
},
{
"time": 29440,
"words": "Can't you see?"
},
{
"time": 31590,
"words": "I could, but wouldn't stay"
},
]
🔧 Setting Up
Open developer tools in your browser & go to Spotify Web.
Switch to 'Network' tab & look for any request similar as follows, copy the value of cookie header & save in a file.
Pass path of this file when instantiating object of Lyrics class.
📃 License
MIT