-
Notifications
You must be signed in to change notification settings - Fork 78
/
Copy pathvideo_adapter_test.go
105 lines (95 loc) · 3.05 KB
/
video_adapter_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
package main
import (
adapter2 "github.com/assimon/svbot/videos/adapter"
"testing"
)
func TestDouyinAdapter_GetShortVideoInfo(t *testing.T) {
adapter := &adapter2.DouyinAdapter{}
resp, err := adapter.GetShortVideoInfo("https://v.douyin.com/MLBnNgY/")
if err != nil {
t.Error(err)
}
if resp == nil {
t.Error("Douyin get no watermark download url fail")
}
}
func TestPipixiaAdapter_GetShortVideoInfo(t *testing.T) {
adapter := &adapter2.PipixiaAdapter{}
resp, err := adapter.GetShortVideoInfo("https://h5.pipix.com/s/MLYcVL7/")
if err != nil {
t.Error(err)
}
if resp == nil {
t.Error("Pipixia get no watermark download url fail")
}
}
func TestHuoshanAdapter_GetShortVideoInfo(t *testing.T) {
adapter := &adapter2.HuoshanAdapter{}
resp, err := adapter.GetShortVideoInfo("https://share.huoshan.com/hotsoon/s/EU67vTEfHx8/")
if err != nil {
t.Error(err)
}
if resp == nil {
t.Error("Huoshan get no watermark download url fail")
}
}
func TestWeishiAdapter_GetShortVideoInfo(t *testing.T) {
adapter := &adapter2.WeishiAdapter{}
resp, err := adapter.GetShortVideoInfo("https://isee.weishi.qq.com/ws/app-pages/share/index.html?wxplay=1&id=7wkzwZSDL1On6v1A2&spid=3712057846823065229&qua=v1_iph_weishi_8.81.0_266_app_a&chid=100081014&pkg=3670&attach=cp_reserves3_1000370011")
if err != nil {
t.Error(err)
}
if resp == nil {
t.Error("Weishi get no watermark download url fail")
}
}
func TestWeiboAdapter_GetShortVideoInfo(t *testing.T) {
adapter := &adapter2.WeiboAdapter{}
resp, err := adapter.GetShortVideoInfo("https://video.weibo.com/show?fid=1034:4284200640308284")
if err != nil {
t.Error(err)
}
if resp == nil {
t.Error("Weibo get no watermark download url fail")
}
}
func TestZuiyouAdapter_GetShortVideoInfo(t *testing.T) {
adapter := &adapter2.ZuiyouAdapter{}
resp, err := adapter.GetShortVideoInfo("https://share.xiaochuankeji.cn/hybrid/share/post?pid=293152528&zy_to=applink&share_count=1&m=2dcd4cdcc14c53c091cdaba91128dcea&d=491114c4fa959852b33646f0c14bf5c9a96519302501213465277c825f1c48d2481eb4298838cc516821e843a90252a2&app=zuiyou&recommend=r0&name=n0&title_type=t0")
if err != nil {
t.Error(err)
}
if resp == nil {
t.Error("Zuiyou get no watermark download url fail")
}
}
func TestLvZhouAdapter_GetShortVideoInfo(t *testing.T) {
adapter := &adapter2.LvZhouAdapter{}
resp, err := adapter.GetShortVideoInfo("https://m.oasis.weibo.cn/v1/h5/share?sid=4822391043132619")
if err != nil {
t.Error(err)
}
if resp == nil {
t.Error("LvZhou get no watermark download url fail")
}
}
func TestKuaiShouAdapter_GetShortVideoInfo(t *testing.T) {
adapter := &adapter2.KuaiShouAdapter{}
resp, err := adapter.GetShortVideoInfo("https://v.kuaishou.com/uH5N5k")
if err != nil {
t.Error(err)
}
if resp == nil {
t.Error("KuaiShou get no watermark download url fail")
}
}
func TestXiGuaAdapter_GetShortVideoInfo(t *testing.T) {
adapter := &adapter2.XiGuaAdapter{}
resp, err := adapter.GetShortVideoInfo("https://v.ixigua.com/MNuytsN/")
if err != nil {
t.Error(err)
}
if resp == nil {
t.Error("Zuiyou get no watermark download url fail")
}
}