Skip to content

Commit

Permalink
added qqmusic lyric decodeHTML
Browse files Browse the repository at this point in the history
  • Loading branch information
gnehs committed Jan 1, 2022
1 parent 0f29b5f commit eb4d53e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dataModule/qqmusic.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const axios = require('axios')
const { decodeHTML } = require("entities")
const { migrate, zhconvert } = require('./lyricUtils')
const pokaLog = require("../log"); // 可愛控制台輸出
const config = require(__dirname + "/../config.json").QQMusic; // 設定
Expand All @@ -20,6 +21,7 @@ async function searchLyrics(keyword) {
// console.log(`${y.songname} timeout.`)
return null
}
lyric = decodeHTML(lyric)
return {
name: y.songname,
artist: y.singer.map(x => x.name).join(`、`),
Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"connect-mongo": "^4.4.1",
"connect-mongodb-session": "*",
"cors": "*",
"entities": "^3.0.1",
"express": "^4.17.1",
"express-session": "^1.17.1",
"express-socket.io-session": "*",
Expand Down

0 comments on commit eb4d53e

Please sign in to comment.