feat: remove panda tv

This commit is contained in:
DIYgod 2019-05-09 00:43:24 +08:00
parent 6e4ccd0647
commit bf276cbe4c
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
3 changed files with 0 additions and 43 deletions

View File

@ -20,10 +20,6 @@
<Route name="直播间开播" author="DIYgod" example="/douyu/room/24422" path="/douyu/room/:id" :paramsDesc="['直播间 id, 可在主播直播间页 URL 中找到']"/>
## 熊猫直播
<Route name="直播间开播下播" author="DIYgod" example="/panda/room/10300" path="/panda/room/:id" :paramsDesc="['直播间 id, 可在主播直播间页 URL 中找到']"/>
## 虎牙直播
<Route name="直播间开播" author="SettingDust xyqfer" example="/huya/live/edmunddzhang" path="/huya/live/:id" :paramsDesc="['直播间id或主播名(有一些id是名字如上)']"/>

View File

@ -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'));

View File

@ -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: `<img referrerpolicy="no-referrer" src="${data.roominfo.pictures.img}">`,
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: `<img referrerpolicy="no-referrer" src="${data.roominfo.pictures.img}">`,
pubDate: new Date(parseInt(data.roominfo.end_time) * 1000).toUTCString(),
guid: data.roominfo.end_time,
link: `https://www.panda.tv/${id}`,
},
],
};
};