feat: 支持kg源歌词获取

This commit is contained in:
helloplhm-qwq
2023-12-31 14:05:45 +08:00
parent 18fd6a4cb2
commit 0d21d71a61
5 changed files with 197 additions and 6 deletions

View File

@ -12,6 +12,8 @@ from .musicInfo import getMusicSingerInfo as _getInfo2
from .musicInfo import getMusicInfo as _getInfo
from .utils import tools
from .player import url
from .lyric import getLyric as _getLyric
from .lyric import lyricSearchByHash as _lyricSearch
from .mv import getMvInfo as _getMvInfo
from .mv import getMvPlayURL as _getMvUrl
from common.exceptions import FailedException
@ -68,4 +70,9 @@ async def mv(hash_):
res1 = res[0]
res2 = res[1]
res1['play_info'] = res2
return res1
return res1
async def lyric(hash_):
lyric_search_result = await _lyricSearch(hash_)
choosed_lyric = lyric_search_result[0]
return await _getLyric(choosed_lyric['id'], choosed_lyric['accesskey'])