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) {