4lyrics 中文文档教程

发布于 6年前 浏览 30 项目主页 更新于 3年前

4Lyrics

从 4 个不同的站点获取歌词! 使用用户输入 :)

  • Musixmatch
  • azlyrics
  • lyrics.com
  • lyricslive

Basic Use

  • Examples used from test file
const lyrics = require('4lyrics');

Musixmatch

lyrics.musixmatch.getURL('more than a feeling')
    .then(r => lyrics.musixmatch.getLyrics(r))
    .then(() => console.log('musixmatch lyrics obtained'))
    .catch(console.error);

Azlyrics

lyrics.azlyrics.getURL('queen you\'re my best friend')
    .then(r => lyrics.azlyrics.getLyrics(r))
    .then(() => console.log('azlyrics lyrics obtained'))
    .catch(console.error);

Lyrics.com

lyrics.lyricscom.getURL('limelight')
    .then(r => lyrics.lyricscom.getLyrics(r))
    .then(() => console.log('lyrics.com lyrics obtained'))
    .catch(console.error);

Lyricslive

lyrics.lyricslive.getURL('don\'t stop')
    .then(r => lyrics.lyricslive.getLyrics(r))
    .then(() => console.log('lyricslive lyrics obtained'))
    .catch(console.error);

Changelog

1.1.5:删除 musixmatch 中更多干扰的 div。

4Lyrics

Get lyrics from 4 different sites! With user input :)

  • Musixmatch
  • azlyrics
  • lyrics.com
  • lyricslive

Basic Use

  • Examples used from test file
const lyrics = require('4lyrics');

Musixmatch

lyrics.musixmatch.getURL('more than a feeling')
    .then(r => lyrics.musixmatch.getLyrics(r))
    .then(() => console.log('musixmatch lyrics obtained'))
    .catch(console.error);

Azlyrics

lyrics.azlyrics.getURL('queen you\'re my best friend')
    .then(r => lyrics.azlyrics.getLyrics(r))
    .then(() => console.log('azlyrics lyrics obtained'))
    .catch(console.error);

Lyrics.com

lyrics.lyricscom.getURL('limelight')
    .then(r => lyrics.lyricscom.getLyrics(r))
    .then(() => console.log('lyrics.com lyrics obtained'))
    .catch(console.error);

Lyricslive

lyrics.lyricslive.getURL('don\'t stop')
    .then(r => lyrics.lyricslive.getLyrics(r))
    .then(() => console.log('lyricslive lyrics obtained'))
    .catch(console.error);

Changelog

1.1.5: Remove more divs in musixmatch that interfere.

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文