36 lines
705 B
Go
36 lines
705 B
Go
|
package logic
|
||
|
|
||
|
import (
|
||
|
"github.com/eigeen/furryboard/spider-scheduler/pkg/conf"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestSearchNewestVideos(t *testing.T) {
|
||
|
BeforeTesting()
|
||
|
videos, err := SearchNewestVideos("furry", conf.Conf.SpiderCore.BiliCookie, 1)
|
||
|
if err != nil {
|
||
|
t.Error(err)
|
||
|
}
|
||
|
t.Log(len(videos))
|
||
|
t.Log(videos[0])
|
||
|
}
|
||
|
|
||
|
func TestGetLiveRoomPageNum(t *testing.T) {
|
||
|
BeforeTesting()
|
||
|
num, err := GetLiveRoomPageNum("furry", conf.Conf.SpiderCore.BiliCookie)
|
||
|
if err != nil {
|
||
|
t.Error(err)
|
||
|
}
|
||
|
t.Log(num)
|
||
|
}
|
||
|
|
||
|
func TestSearchLiveRooms(t *testing.T) {
|
||
|
BeforeTesting()
|
||
|
rooms, err := SearchLiveRooms("furry", conf.Conf.SpiderCore.BiliCookie, 1)
|
||
|
if err != nil {
|
||
|
t.Error(err)
|
||
|
}
|
||
|
t.Log(len(rooms))
|
||
|
t.Log(rooms[0])
|
||
|
}
|