-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtest.php
More file actions
27 lines (25 loc) · 892 Bytes
/
test.php
File metadata and controls
27 lines (25 loc) · 892 Bytes
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
<?php
require('debug.php');
require('src/followSource.php');
$downloader = (new ReflectionClass('AumFollowSource'))->newInstance();
$testArray = array(
array('title' => '考试什么的都去死吧', 'artist' => '徐良')
);
foreach ($testArray as $key => $item) {
echo "\n++++++++++++++++++++++++++++++\n";
echo "测试 $key 开始...\n";
if ($key > 0) {
echo "等待 5 秒...\n";
sleep(5);
}
echo "{title = " . $item['title'] . "; artist = " . $item['artist'] . " }.\n";
$testObj = new AudioStationResult();
$count = $downloader->getLyricsList($item['artist'], $item['title'], $testObj);
if ($count > 0) {
$item = $testObj->getFirstItem();
$downloader->getLyrics($item['id'], $testObj);
} else {
echo "没有查找到任何歌词!\n";
}
echo "测试 $key 结束。\n";
}