-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathtest.php
35 lines (33 loc) · 1.5 KB
/
test.php
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
<?php
require('debug.php');
require('src/qqSource.php');
$downloader = (new ReflectionClass('AumQQSource'))->newInstance();
$testArray = array(
array('title' => '별', 'artist' => 'Loco&俞胜恩'),
array('title' => 'Reign Fall', 'artist' => 'Chamillionaire&Scarface&Killer Mike'),
array('title' => 'ひとつのハートで-《神龙斗士》TV动画第1-32集片头曲', 'artist' => '三重野瞳'),
array('title' => '빠빠빠', 'artist' => 'Crayon Pop'),
array('title' => '유후', 'artist' => 'Brave Girls'),
array('title' => 'Mood(Explicit)', 'artist' => '24KGoldn&iann dior'),
array('title' => 'Silence(Illenium Remix)', 'artist' => 'Khalid&Illenium&marshmello'),
array('title' => 'WOW', 'artist' => 'Dom.T'),
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";
}