24 lines
378 B
Go
24 lines
378 B
Go
|
package acfun_api
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"net/http"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestGetDanmaku(t *testing.T) {
|
||
|
client := &http.Client{}
|
||
|
danmakus, err := GetDanmaku(client, "12528563")
|
||
|
if err != nil {
|
||
|
t.Fatal(err)
|
||
|
}
|
||
|
t.Log(len(danmakus))
|
||
|
// fmt.Println(danmakus)
|
||
|
for _, danmaku := range danmakus {
|
||
|
fmt.Println(danmaku)
|
||
|
}
|
||
|
if len(danmakus) == 0 {
|
||
|
t.Fatal("danmakus is empty")
|
||
|
}
|
||
|
}
|