2020-07-27 21:42:45 +02:00
|
|
|
package downloader
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/sirupsen/logrus"
|
|
|
|
)
|
|
|
|
|
2020-07-27 23:14:06 +02:00
|
|
|
func TestGetPlaylistVideoIDs(t *testing.T) {
|
2020-07-27 21:57:19 +02:00
|
|
|
videoIDs, err := GetPlaylistVideoIDs("UCJ0-OtVpF0wOKEqT2Z1HEtA", 50)
|
2020-07-27 21:42:45 +02:00
|
|
|
if err != nil {
|
|
|
|
logrus.Error(err)
|
|
|
|
}
|
|
|
|
for _, id := range videoIDs {
|
|
|
|
println(id)
|
|
|
|
}
|
|
|
|
}
|
2020-07-27 23:14:06 +02:00
|
|
|
|
|
|
|
func TestGetVideoInformation(t *testing.T) {
|
2020-07-29 03:34:08 +02:00
|
|
|
video, err := GetVideoInformation("zj7pXM9gE5M", nil)
|
2020-07-27 23:14:06 +02:00
|
|
|
if err != nil {
|
|
|
|
logrus.Error(err)
|
|
|
|
}
|
|
|
|
if video != nil {
|
|
|
|
logrus.Info(video.ID)
|
|
|
|
}
|
|
|
|
}
|