From bf276cbe4c4b744dfd1153829735964476616113 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Thu, 9 May 2019 00:43:24 +0800 Subject: [PATCH] feat: remove panda tv --- docs/live.md | 4 ---- lib/router.js | 3 --- lib/routes/panda/room.js | 36 ------------------------------------ 3 files changed, 43 deletions(-) delete mode 100644 lib/routes/panda/room.js diff --git a/docs/live.md b/docs/live.md index 8b8cfa44e..233a5be67 100644 --- a/docs/live.md +++ b/docs/live.md @@ -20,10 +20,6 @@ -## 熊猫直播 - - - ## 虎牙直播 diff --git a/lib/router.js b/lib/router.js index e12b164f1..228f6eaac 100755 --- a/lib/router.js +++ b/lib/router.js @@ -306,9 +306,6 @@ router.get('/dribbble/keyword/:keyword', require('./routes/dribbble/keyword')); // 斗鱼 router.get('/douyu/room/:id', require('./routes/douyu/room')); -// 熊猫直播 -router.get('/panda/room/:id', require('./routes/panda/room')); - // 虎牙 router.get('/huya/live/:id', require('./routes/huya/live')); diff --git a/lib/routes/panda/room.js b/lib/routes/panda/room.js deleted file mode 100644 index 2f9f21b13..000000000 --- a/lib/routes/panda/room.js +++ /dev/null @@ -1,36 +0,0 @@ -const axios = require('../../utils/axios'); - -module.exports = async (ctx) => { - const id = ctx.params.id; - - const response = await axios({ - method: 'get', - url: `http://www.panda.tv/api_room?roomid=${id}`, - headers: { - Referer: `https://www.panda.tv/${id}`, - }, - }); - - const data = response.data.data; - - ctx.state.data = { - title: `${data.hostinfo.name}的熊猫直播间`, - link: `https://www.panda.tv/${id}`, - item: [ - { - title: `开播: ${data.roominfo.name}`, - description: ``, - pubDate: new Date(parseInt(data.roominfo.start_time) * 1000).toUTCString(), - guid: data.roominfo.start_time, - link: `https://www.panda.tv/${id}`, - }, - { - title: `下播: ${data.roominfo.name}`, - description: ``, - pubDate: new Date(parseInt(data.roominfo.end_time) * 1000).toUTCString(), - guid: data.roominfo.end_time, - link: `https://www.panda.tv/${id}`, - }, - ], - }; -};