mirror of
https://github.com/lyz05/danmaku.git
synced 2026-07-08 05:06:08 +08:00
fix: 修正腾讯视频标题显示
This commit is contained in:
@@ -11,4 +11,5 @@ const tencentvideo = new Tencentvideo();
|
||||
const youku = new Youku();
|
||||
const iqiyi = new Iqiyi();
|
||||
|
||||
//TODO 优化代码
|
||||
module.exports = { bilibili, mgtv, tencentvideo, youku, iqiyi };
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user