fix: 修正腾讯视频标题显示

This commit is contained in:
lyz05
2022-11-09 22:30:43 +08:00
parent 7b6290aa35
commit 27a6604af2
2 changed files with 3 additions and 3 deletions

View File

@@ -11,4 +11,5 @@ const tencentvideo = new Tencentvideo();
const youku = new Youku();
const iqiyi = new Iqiyi();
//TODO 优化代码
module.exports = { bilibili, mgtv, tencentvideo, youku, iqiyi };

View File

@@ -24,11 +24,10 @@ function Tencentvideo() {
} else {
vid = path.slice(-1)[0].split('.')[0];
}
console.log('vid:', vid)
let res = await axios.get(url);
//TODO 腾讯视频标题获取
const $ = whacko.load(res.data, null, false);
this.title = $("title")[0].children[0].data;
this.title = $("title")[0].children[0].data.split('_')[0];
console.log('vid:', vid,'title:', this.title)
try {
res = await axios.get(api_danmaku_base + vid);
} catch (e) {