🎨 优化bilibili

This commit is contained in:
源文雨
2022-10-07 12:21:20 +08:00
parent 519ae62760
commit 9cb54a34da
18 changed files with 467 additions and 897 deletions

View File

@@ -2,10 +2,12 @@ package bilibili
import (
"testing"
bz "github.com/FloatTech/AnimeAPI/bilibili"
)
func TestArticleInfo(t *testing.T) {
card, err := getArticleInfo("17279244")
card, err := bz.GetArticleInfo("17279244")
if err != nil {
t.Fatal(err)
}
@@ -43,7 +45,7 @@ func TestDynamicDetail(t *testing.T) {
}
func TestMemberCard(t *testing.T) {
card, err := getMemberCard(2)
card, err := bz.GetMemberCard(2)
if err != nil {
t.Fatal(err)
}
@@ -51,22 +53,22 @@ func TestMemberCard(t *testing.T) {
}
func TestVideoInfo(t *testing.T) {
card, err := getVideoInfo("10007")
card, err := bz.GetVideoInfo("10007")
if err != nil {
t.Fatal(err)
}
t.Log(videoCard2msg(card))
card, err = getVideoInfo("BV1xx411c7mD")
card, err = bz.GetVideoInfo("BV1xx411c7mD")
if err != nil {
t.Fatal(err)
}
t.Log(videoCard2msg(card))
card, err = getVideoInfo("bv1xx411c7mD")
card, err = bz.GetVideoInfo("bv1xx411c7mD")
if err != nil {
t.Fatal(err)
}
t.Log(videoCard2msg(card))
card, err = getVideoInfo("BV1mF411j7iU")
card, err = bz.GetVideoInfo("BV1mF411j7iU")
if err != nil {
t.Fatal(err)
}
@@ -74,7 +76,7 @@ func TestVideoInfo(t *testing.T) {
}
func TestLiveRoomInfo(t *testing.T) {
card, err := getLiveRoomInfo("83171")
card, err := bz.GetLiveRoomInfo("83171")
if err != nil {
t.Fatal(err)
}