This library provides an API to search for lyrics from various providers in China.
- KuGou Music
- QQ Music
- Netease Music
Before using, you need to install it
go get github.com/SukiEva/lyric-go
package main
import (
"fmt"
"github.com/SukiEva/lyric-go"
)
func main() {
l := lyric.Default() // use all three providers
data := lyric.MediaData{
Title: "å¤ç‹¬", // Must
Artist: "邓紫棋", // Suggest
Album: "", // Suggest
Duration: 1000,
}
lrc, err := l.GetLyric(data)
if err != nil {
fmt.Println(err)
}
fmt.Println(lrc)
}
package main
import (
"fmt"
"github.com/SukiEva/lyric-go"
)
func main() {
l := lyric.New() // blanket provider
l.AddKugou()
l.AddNetease()
l.AddQQmusic()
data := lyric.MediaData{
Title: "å¤ç‹¬", // Must
Artist: "邓紫棋", // Suggest
Album: "", // Suggest
Duration: 1000,
}
lrc, err := l.GetLyric(data)
if err != nil {
fmt.Println(err)
}
fmt.Println(lrc)
}
You are more than welcome to contribute to this project. Fork and make a Pull Request, or create an Issue if you see any problem or want to propose a feature.