feat: remove notOperational routes - live

This commit is contained in:
DIYgod
2023-12-20 00:46:34 +08:00
parent a63c86a049
commit 1c057d9ab7
21 changed files with 0 additions and 430 deletions
-12
View File
@@ -57,9 +57,6 @@ router.get('/infzm/:id', lazyloadRouteHandler('./routes/infzm/news'));
// 虎牙
router.get('/huya/live/:id', lazyloadRouteHandler('./routes/huya/live'));
// SHOWROOM直播
router.get('/showroom/room/:id', lazyloadRouteHandler('./routes/showroom/room'));
// v2ex
// router.get('/v2ex/topics/:type', lazyloadRouteHandler('./routes/v2ex/topics'));
// router.get('/v2ex/post/:postid', lazyloadRouteHandler('./routes/v2ex/post'));
@@ -1100,9 +1097,6 @@ router.get('/watchface/:watch_type?/:list_type?', lazyloadRouteHandler('./routes
router.get('/cnu/selected', lazyloadRouteHandler('./routes/cnu/selected'));
router.get('/cnu/discovery/:type?/:category?', lazyloadRouteHandler('./routes/cnu/discovery'));
// 战旗直播
router.get('/zhanqi/room/:id', lazyloadRouteHandler('./routes/zhanqi/room'));
// 酒云网
router.get('/wineyun/:category', lazyloadRouteHandler('./routes/wineyun'));
@@ -1585,9 +1579,6 @@ router.get('/porn-images-xxx/:type?/:name?', lazyloadRouteHandler('./routes/hent
// dcinside
router.get('/dcinside/board/:id', lazyloadRouteHandler('./routes/dcinside/board'));
// 企鹅电竞
router.get('/egameqq/room/:id', lazyloadRouteHandler('./routes/tencent/egame/room'));
// 荔枝FM
router.get('/lizhi/user/:id', lazyloadRouteHandler('./routes/lizhi/user'));
@@ -1654,9 +1645,6 @@ router.get('/socialbeta/home', lazyloadRouteHandler('./routes/socialbeta/home'))
// 东方我乐多丛志
router.get('/touhougarakuta/:language/:type', lazyloadRouteHandler('./routes/touhougarakuta'));
// 猎趣TV
router.get('/liequtv/room/:id', lazyloadRouteHandler('./routes/liequtv/room'));
// 北京物资学院
router.get('/bwu/news', lazyloadRouteHandler('./routes/universities/bwu/news'));
-36
View File
@@ -1,36 +0,0 @@
const got = require('@/utils/got');
module.exports = async (ctx) => {
const id = ctx.params.id;
const response = await got.get(`https://liequ.njcywl88.com/${id}`);
if (response.data.match(/主播不存在/)) {
throw '主播不存在';
}
const liveInfo = JSON.parse(response.data.match(/_DATA\.live=(.*?);/)[1]);
const userInfo = JSON.parse(response.data.match(/_DATA\.anchor=(.*?);/)[1]);
const item =
liveInfo.islive !== '1'
? []
: [
{
title: liveInfo.title,
author: userInfo.user_nicename,
description: liveInfo.thumb ? `<img src="${liveInfo.thumb}">` : '',
pubDate: new Date(liveInfo.starttime * 1000),
url: response.url,
guid: liveInfo.room_num + liveInfo.starttime,
},
];
ctx.state.data = {
title: `${userInfo.user_nicename} - 猎趣TV`,
image: userInfo.avatar,
description: userInfo.signature,
link: response.url,
item,
allowEmpty: true,
};
};
-31
View File
@@ -1,31 +0,0 @@
const got = require('@/utils/got');
module.exports = async (ctx) => {
const id = ctx.params.id;
const response = await got({
method: 'get',
url: `https://www.showroom-live.com/api/room/profile?room_id=${id}`,
});
const data = response.data;
let item;
if (data.is_onlive) {
item = [
{
title: data.room_name,
pubDate: new Date(data.current_live_started_at * 1000),
guid: new Date(data.current_live_started_at * 1000).toUTCString(),
link: data.share_url_live,
},
];
}
ctx.state.data = {
title: `${data.room_name}的SHOWROOM直播间`,
link: data.share_url_live,
item,
allowEmpty: true,
};
};
-52
View File
@@ -1,52 +0,0 @@
const got = require('@/utils/got');
const { JSDOM } = require('jsdom');
function nuxtReader(data) {
let nuxt = {};
try {
const dom = new JSDOM(data, {
runScripts: 'dangerously',
url: 'https://egame.qq.com',
});
nuxt = dom.window.__NUXT__;
} catch (e) {
throw new Error('Nuxt 框架信息提取失败,请报告这个问题');
}
return nuxt;
}
module.exports = async (ctx) => {
const id = ctx.params.id;
const url = `https://egame.qq.com/${id}`;
const response = await got({
method: 'get',
url,
});
const result = await nuxtReader(response.data);
const liveInfo = result.state['live-info'].liveInfo;
const item =
liveInfo.profileInfo.isLive !== 1
? []
: [
{
title: liveInfo.videoInfo.title,
author: liveInfo.profileInfo.nickName,
description: liveInfo.videoInfo.url ? `<img src="${liveInfo.videoInfo.url}">` : '',
pubDate: new Date(liveInfo.videoInfo.pid.split('_').slice(-1) * 1000),
url,
guid: liveInfo.videoInfo.pid,
},
];
ctx.state.data = {
title: `${liveInfo.profileInfo.nickName} - 企鹅电竞`,
image: liveInfo.profileInfo.posterUrl,
description: liveInfo.profileInfo.brief,
link: url,
item,
allowEmpty: true,
};
};
-37
View File
@@ -1,37 +0,0 @@
const got = require('@/utils/got');
module.exports = async (ctx) => {
const id = ctx.params.id;
const regexp = /(?<=window.oPageConfig.oRoom\s*=\s*)\{.*\}/;
const response = await got({
method: 'get',
url: `https://www.zhanqi.tv/${id}`,
});
const html = response.data;
const strArr = html.split('\n');
const str = strArr.find((str) => regexp.test(str));
// console.log(str.match(regexp)[0]);
const room = JSON.parse(str.match(regexp)[0]);
let item;
if (room.status !== '0') {
item = [
{
title: `开播: ${room.title}`,
// unix时间戳
pubDate: new Date(room.liveTime * 1000).toUTCString(),
guid: room.liveTime,
link: `https://www.zhanqi.tv${room.url}`,
description: room.roomDesc,
},
];
}
ctx.state.data = {
title: `${room.nickname}的战旗直播间`,
link: `https://www.zhanqi.tv${room.url}`,
item,
allowEmpty: true,
};
};
-36
View File
@@ -1,36 +0,0 @@
const got = require('@/utils/got');
const { parseDate } = require('@/utils/parse-date');
module.exports = async (ctx) => {
const id = ctx.params.id;
const rootUrl = 'https://live.qq.com';
const currentUrl = `${rootUrl}/${id}`;
const response = await got({
method: 'get',
url: currentUrl,
});
const data = response.data.match(/"is_live":(\d),"game_count".*"nickname":"(.*)","child_name".*"show_time":(\d+),"activity".*"room_name":"(.*)","user_chat_level"/);
const items =
data[1] === '1'
? [
{
author: data[2],
guid: data[3],
title: data[4],
pubDate: parseDate(data[3] * 1000),
link: currentUrl,
},
]
: [];
ctx.state.data = {
title: `${data[2]}直播间 - 企鹅直播`,
link: currentUrl,
item: items,
allowEmpty: true,
};
};
-1
View File
@@ -4,5 +4,4 @@ module.exports = {
'/fact': ['hoilc'],
'/kg/:userId': ['zhangxiang012'],
'/kg/reply/:playId': ['zhangxiang012'],
'/live/:id': ['nczitzk'],
};
-8
View File
@@ -15,14 +15,6 @@ module.exports = {
target: '/qq/ac/comic/:id',
},
],
live: [
{
title: '企鹅直播',
docs: 'https://docs.rsshub.app/routes/live#qi-e-zhi-bo-zhi-bo-jian-ti-xing',
source: ['/:id', '/'],
target: '/qq/live/:id',
},
],
'node.kg': [
{
title: '用户作品列表 - 全民 K 歌',
-1
View File
@@ -4,5 +4,4 @@ module.exports = function (router) {
router.get('/fact', require('./fact'));
router.get('/kg/:userId', require('./kg/user'));
router.get('/kg/reply/:playId', require('./kg/reply'));
router.get('/live/:id', require('./live'));
};
-12
View File
@@ -1,18 +1,6 @@
module.exports = {
'qq.com': {
_name: '腾讯',
egame: [
{
title: '企鹅电竞直播间',
docs: 'https://docs.rsshub.app/routes/live#qi-e-dian-jing-zhi-bo-jian-kai-bo',
source: '/:id',
target: (params) => {
if (params.id.match(/^\d+$/)) {
return '/egameqq/room/:id';
}
},
},
],
'mp.weixin': [
{
title: '微信公众号栏目',
-71
View File
@@ -1,71 +0,0 @@
const got = require('@/utils/got');
const { JSDOM } = require('jsdom');
const { parseDate } = require('@/utils/parse-date');
const { art } = require('@/utils/render');
const path = require('path');
const baseUrl = 'https://www.vlive.tv';
module.exports = async (ctx) => {
const { channel, board } = ctx.params;
const link = `${baseUrl}/channel/${channel}/board/${board}`;
const response = await got(link);
const dom = new JSDOM(response.data, {
runScripts: 'dangerously',
});
const preloadedState = dom.window.__PRELOADED_STATE__;
const channelData = preloadedState.channel.channel;
const userCountry = preloadedState.common.userCountry;
const userLanguage = preloadedState.common.userLanguage;
const apiResponse = await got(`${baseUrl}/globalv-web/vam-web/post/v1.0/board-${board}/posts`, {
searchParams: {
appId: '8c6cc7b45d2568fb668be6e05b6e5a3b',
fields: 'attachments,author,availableActions,board{boardId,title,boardType,payRequired,includedCountries,excludedCountries},channel{channelName,channelCode},totalCommentCount,contentType,createdAt,emotionCount,excludedCountries,includedCountries,isCommentEnabled,isHiddenFromStar,lastModifierMember,notice,officialVideo,plainBody,postId,postVersion,reservation,starReactions,targetMember,thumbnail,title,url,writtenIn,sharedPosts,originPost,blindType',
sortType: 'LATEST',
limit: ctx.query.limit ? Number(ctx.query.limit) : 20,
gcc: userCountry,
locale: userLanguage,
},
headers: {
referer: link,
},
});
const items = apiResponse.data.data.map((item) => {
let description;
switch (item.contentType) {
case 'POST':
description = art(path.join(__dirname, 'templates/post.art'), {
post: item.plainBody?.replace(/\r\n/g, '<br><br>').replace(/\n/g, '<br>'),
images: item.attachments.photo,
});
break;
case 'VIDEO':
description = art(path.join(__dirname, 'templates/video.art'), {
link: item.url,
image: item.officialVideo.thumb,
});
break;
default:
throw `Unknown content type: ${item.contentType}`;
}
return {
title: item.title,
description,
link: item.url,
author: item.author.nickname,
pubDate: parseDate(item.createdAt),
};
});
ctx.state.data = {
title: `${channelData.channelName} Channel`,
description: channelData.channelDescription,
link,
image: channelData.channelProfileImage,
item: items,
};
};
-3
View File
@@ -1,3 +0,0 @@
module.exports = {
'/channel/:channel/board/:board': ['TonyRL'],
};
-13
View File
@@ -1,13 +0,0 @@
module.exports = {
'vlive.tv': {
_name: 'V LIVE',
'.': [
{
title: 'Board',
docs: 'https://docs.rsshub.app/routes/en/live#v-live',
source: '/channel/:board/board/:board',
target: '/vlive/channel/:board/board/:board',
},
],
},
};
-3
View File
@@ -1,3 +0,0 @@
module.exports = (router) => {
router.get('/channel/:channel/board/:board', require('./index'));
};
-8
View File
@@ -1,8 +0,0 @@
{{ if post }}
{{@ post }}
{{ /if }}
{{ if images }}
{{ each images image }}
<img src="{{ image.url }}">
{{ /each }}
{{ /if }}
-3
View File
@@ -1,3 +0,0 @@
{{ if image }}
<a href="{{ link }}"><img src="{{ image }}"></a>
{{ /if }}
-42
View File
@@ -1,42 +0,0 @@
const got = require('@/utils/got');
const { parseDate } = require('@/utils/parse-date');
module.exports = async (ctx) => {
const id = ctx.params.id;
const rootUrl = 'https://www.wangqiutiyu.com';
const currentUrl = `${rootUrl}/anchor/${id}`;
const response = await got({
method: 'get',
url: currentUrl,
});
const apiResponse = await got({
method: 'get',
url: `https://api.ikangsports.com:442/signal-front/live/matchLiveInfo?userId=0&gtvId=${response.data.match(/gtvId:(\d+),heat/)[1]}&source=0&liveType=0`,
});
const data = apiResponse.data.data[0];
const items =
data.state === 2
? [
{
title: response.data.match(/barTitle:"(.*)",displayType/)[1],
author: data.name,
link: currentUrl,
guid: data.pushTime,
pubDate: parseDate(data.pushTime),
},
]
: [];
ctx.state.data = {
title: `${data.name}直播间 - 旺球体育`,
link: currentUrl,
item: items,
allowEmpty: true,
description: response.data.match(/barIntroduction:"(.*)",barNo/)[1],
};
};
-3
View File
@@ -1,3 +0,0 @@
module.exports = {
'/anchor/:id': ['nczitzk'],
};
-13
View File
@@ -1,13 +0,0 @@
module.exports = {
'wangqiutiyu.com': {
_name: '旺球体育',
'.': [
{
title: '直播间开播',
docs: 'https://docs.rsshub.app/routes/live#wang-qiu-ti-yu-zhi-bo-jian-kai-bo',
source: ['/anchor/:id', '/'],
target: '/wangqiutiyu/anchor/:id',
},
],
},
};
-3
View File
@@ -1,3 +0,0 @@
module.exports = function (router) {
router.get('/anchor/:id', require('./anchor'));
};
-42
View File
@@ -10,12 +10,6 @@
<Route author="Kiotlin" example="/lxixsxa/disco" path="/lxixsxa/disco" radar="1" />
## SHOWROOM 直播 {#showroom-zhi-bo}
### 直播间开播 {#showroom-zhi-bo-zhi-bo-jian-kai-bo}
<Route author="nwindz" example="/showroom/room/93401" path="/showroom/room/:id" paramsDesc={['直播间 id, 打开浏览器控制台,刷新页面,找到请求中的room_id参数']} notOperational="1" />
## Twitch {#twitch}
### Live {#twitch-live}
@@ -34,12 +28,6 @@
<Route author="hoilc" path="/twitch/schedule/:login" example="/twitch/schedule/riotgames" paramsDesc={['Twitch username']} radar="1" notOperational="1" />
## V LIVE {#v-live}
### Board {#v-live-board}
<Route author="TonyRL" example="/vlive/channel/FD53B/board/3530" path="/vlive/channel/:channel/board/:board" paramsDesc={['Channel ID, can be found in the URL', 'Board ID, can be found in the URL']} radar="1" notOperational="1" />
## Yoasobi Official {#yoasobi-official}
### News & Biography {#yoasobi-official-news-biography}
@@ -101,33 +89,3 @@
### 直播间开播 {#lang-play-zhi-bo-zhi-bo-jian-kai-bo}
<Route author="MittWillson" example="/lang/live/room/1352360" path="/lang/live/room/:id" paramsDesc={['直播间 id, 可在主播直播间页 URL 中找到']} anticrawler="1" />
## 猎趣 TV {#lie-qu-tv}
### 直播间开播 {#lie-qu-tv-zhi-bo-jian-kai-bo}
<Route author="hoilc" example="/liequtv/room/175435" path="/liequtv/room/:id" paramsDesc={['直播间 id, 可在主播直播间页 URL 中找到']} notOperational="1" />
## 企鹅电竞 {#qi-e-dian-jing}
### 直播间开播 {#qi-e-dian-jing-zhi-bo-jian-kai-bo}
<Route author="hoilc" example="/egameqq/room/497383565" path="/egameqq/room/:id" paramsDesc={['直播间 id, 可在主播直播间页 URL 中找到']} />
## 企鹅直播 {#qi-e-zhi-bo}
### 直播间开播 {#qi-e-zhi-bo-zhi-bo-jian-kai-bo}
<Route author="nczitzk" example="/qq/live/10012045" path="/qq/live/:id" paramsDesc={['直播间 id, 可在主播直播间页 URL 中找到']} notOperational="1" />
## 旺球体育 {#wang-qiu-ti-yu}
### 直播间开播 {#wang-qiu-ti-yu-zhi-bo-jian-kai-bo}
<Route author="nczitzk" example="/wangqiutiyu/anchor/444" path="/wangqiutiyu/anchor/:id" paramsDesc={['直播间 id, 可在主播直播间页 URL 中找到']} notOperational="1" />
## 战旗直播 {#zhan-qi-zhi-bo}
### 直播间开播 {#zhan-qi-zhi-bo-zhi-bo-jian-kai-bo}
<Route author="cssxsh" example="/zhanqi/room/anime" path="/zhanqi/room/:id" paramsDesc={['直播间 id, 可在主播直播间页 URL 中找到']} notOperational="1" />