geciwang.ts 419 B

123456789101112131415161718
  1. const plugin = require('../plugins/geciwang');
  2. async function run() {
  3. // 测试搜索歌词
  4. const searchResult = await plugin.search('七里香', 1, 'lyric');
  5. console.log(searchResult);
  6. if (searchResult.data.length > 0) {
  7. const musicItem = searchResult.data[0];
  8. const lyricResult = await plugin.getLyric(musicItem);
  9. console.log(lyricResult);
  10. }
  11. }
  12. run();