npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lyrixcope

v1.1.2

Published

A simple Node.js library for scraping song lyrics from lyrics.com

Downloads

9

Readme

LyriXcope

LyriXcope is a simple Node.js library that allows you to scrape song lyrics from lyrics.com with ease. A Lyrics.com account is required.

Installation

Install LyriXcope using NPM:

npm i lyrixcope

Usage

To use LyriXcope, simply include and configure it in your project and call the getSongLyrics(song, artist) function. Here's an example:

const { configureLyrixcope, getSongLyrics } = require("lyrixcope");

async function main() {
  configureLyrixcope("user_id", "api_key");
  const songData = await getSongLyrics("a man without love");
  console.log(songData);
}

main();

This will output:

{
  status: 200,
  song: {
    song: "Man Without Love",
    "song-link": "https://www.lyrics.com/lyric/4710969/Engelbert+Humperdinck/Man+Without+Love",
    artist: "Engelbert Humperdinck",
    "artist-link": "https://www.lyrics.com/artist/Engelbert+Humperdinck/14870",
    album: "Easy Listening Gold: 1968-1969",
    "album-link": "https://www.lyrics.com/album/529992/Easy Listening Gold: 1968-1969"
  },
  lyrics: "I can remember when we walked together\n
  Sharing a love I thought would last forever\n
  Moonlight to show the way so we can follow\n
  Waiting inside her eyes was my tomorrow\n
  Then something changed her mind, her kisses told me\n
  I had no lovin' arms to hold me\n\n
  Every day I wake up, then I start to break up\n
  Lonely is a man without love\n
  Every day I start out, then I cry my heart out\n
  Lonely is a man without love\n\n
  Every day I wake up, then I start to break up\n
  Knowing that it's cloudy above\n
  Every day I start out, then I cry my heart out\n
  Lonely is a man without love\n\n
  I cannot face this world that's fallen down on me\n
  So, if you see my girl, please send her home to me\n
  Tell her about my heart that's slowly dying\n
  Say I can't stop myself from crying\n\n
  Every day I wake up, then I start to break up\n
  Lonely is a man without love\n
  Every day I start out, then I cry my heart out\n
  Lonely is a man without love\n\n
  Every day I wake up, then I start to break up\n
  Knowing that it's cloudy above\n
  Every day I start out, then I cry my heart out\n
  Lonely is a man without love\n\n
  Every day I wake up, then I start to break up\n
  Lonely is a man without love\n
  Every day I start out, then I cry my heart out\n
  Lonely is a man without love"
}

If the API keys are invalid or the song isn't available, the response will be:

{ status: 403, song: null, lyrics: null } //invalid token
{ status: 404, song: null, lyrics: null } //not found

The artist name parameter is optional. If provided, it helps narrow down the search results.

Requirements

  • Node.js
  • Lyrics.com account
  • npm

Depenencies:

  • axios
  • cheerio

API Key

LyriXcope requires an API key and User ID from lyrics.com to function properly. You can obtain a free API key by signing up here. Please note that there is a limit of 100 requests per day.

License

LyriXcope is licensed under the MIT License.

Contributors