4lyrics 中文文档教程
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.