-
Notifications
You must be signed in to change notification settings - Fork 26
/
test.js
56 lines (38 loc) · 1.62 KB
/
test.js
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
var { plan, pass, skip } = require('tap');
var co = require('co');
var main = require('./lib');
var options = {
dryRun: true,
silent: true,
output: 'av%(aid)s %(title)s%(#index&&"\\(")s%(index)s%(#index&&"\\)")s%(#index_title&&" ")s%(index_title)s.%(ext)s'
};
co(function* () {
plan(12);
// yield main('https://www.bilibili.com/video/av106', options);
skip('get user-uploaded video');
// yield main('https://www.bilibili.com/video/av8042104/', options);
skip('get user-uploaded video (multipart)');
// yield main('https://www.bilibili.com/video/av8042104/index_1.html', options);
skip('get user-uploaded video (multipart) p2');
// yield main('https://www.bilibili.com/video/av25432066/?p=39', options);
skip('get user-uploaded video (multipart) p3');
yield main('https://www.bilibili.com/bangumi/play/ss12364/', options);
pass('get movie bangumi');
// yield main('https://bangumi.bilibili.com/anime/3418', options);
skip('get tv bangumi (A)');
// yield main('https://bangumi.bilibili.com/anime/3418/play#84970', options);
skip('get tv bangumi eposide (A)');
// yield main('https://www.bilibili.com/bangumi/play/ss3418', options);
skip('get tv bangumi (B)');
// yield main('https://www.bilibili.com/bangumi/play/ep84969', options);
skip('get tv bangumi episode (B1)');
// yield main('https://www.bilibili.com/bangumi/play/ss3418#84970', options);
skip('get tv bangumi episode (B2)');
// yield main('http://acg.tv/av106', options);
skip('get link redirects to bilibili');
try {
yield main('http://acg.tv/av1267', options);
} catch(e) {
pass('display error message');
}
});