From 27a6604af2b151c8c312f0bf76e8d9a4d9219e50 Mon Sep 17 00:00:00 2001 From: lyz05 <294068487@qq.com> Date: Wed, 9 Nov 2022 22:30:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E8=85=BE=E8=AE=AF?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=A0=87=E9=A2=98=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/api/base.js | 1 + routes/api/tencentvideo.js | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/api/base.js b/routes/api/base.js index d64d4ae..33cfcb4 100644 --- a/routes/api/base.js +++ b/routes/api/base.js @@ -11,4 +11,5 @@ const tencentvideo = new Tencentvideo(); const youku = new Youku(); const iqiyi = new Iqiyi(); +//TODO 优化代码 module.exports = { bilibili, mgtv, tencentvideo, youku, iqiyi }; \ No newline at end of file diff --git a/routes/api/tencentvideo.js b/routes/api/tencentvideo.js index 11818ae..944d79b 100644 --- a/routes/api/tencentvideo.js +++ b/routes/api/tencentvideo.js @@ -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) {