diff --git a/lib/router.js b/lib/router.js index 21cd382c28cb8a..edfa5fb5132045 100644 --- a/lib/router.js +++ b/lib/router.js @@ -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')); diff --git a/lib/routes/liequtv/room.js b/lib/routes/liequtv/room.js deleted file mode 100644 index cc51043ab7c834..00000000000000 --- a/lib/routes/liequtv/room.js +++ /dev/null @@ -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 ? `` : '', - 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, - }; -}; diff --git a/lib/routes/showroom/room.js b/lib/routes/showroom/room.js deleted file mode 100644 index 35f63b849f58af..00000000000000 --- a/lib/routes/showroom/room.js +++ /dev/null @@ -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, - }; -}; diff --git a/lib/routes/tencent/egame/room.js b/lib/routes/tencent/egame/room.js deleted file mode 100644 index c5d11af0272634..00000000000000 --- a/lib/routes/tencent/egame/room.js +++ /dev/null @@ -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 ? `` : '', - 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, - }; -}; diff --git a/lib/routes/zhanqi/room.js b/lib/routes/zhanqi/room.js deleted file mode 100644 index f75e756bcfe94b..00000000000000 --- a/lib/routes/zhanqi/room.js +++ /dev/null @@ -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, - }; -}; diff --git a/lib/v2/qq/live.js b/lib/v2/qq/live.js deleted file mode 100644 index 23a915e30a68ef..00000000000000 --- a/lib/v2/qq/live.js +++ /dev/null @@ -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, - }; -}; diff --git a/lib/v2/qq/maintainer.js b/lib/v2/qq/maintainer.js index b5ef93f713e3e1..3d904715837c15 100644 --- a/lib/v2/qq/maintainer.js +++ b/lib/v2/qq/maintainer.js @@ -4,5 +4,4 @@ module.exports = { '/fact': ['hoilc'], '/kg/:userId': ['zhangxiang012'], '/kg/reply/:playId': ['zhangxiang012'], - '/live/:id': ['nczitzk'], }; diff --git a/lib/v2/qq/radar.js b/lib/v2/qq/radar.js index f273d28a8cd2c4..ab42693277da7d 100644 --- a/lib/v2/qq/radar.js +++ b/lib/v2/qq/radar.js @@ -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 歌', diff --git a/lib/v2/qq/router.js b/lib/v2/qq/router.js index 0d38e65656ed0e..b6297c74dfe0db 100644 --- a/lib/v2/qq/router.js +++ b/lib/v2/qq/router.js @@ -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')); }; diff --git a/lib/v2/tencent/radar.js b/lib/v2/tencent/radar.js index c48bd3969ae81c..69567bfa01f956 100644 --- a/lib/v2/tencent/radar.js +++ b/lib/v2/tencent/radar.js @@ -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: '微信公众号栏目', diff --git a/lib/v2/vlive/index.js b/lib/v2/vlive/index.js deleted file mode 100644 index 3721ff43afc8e0..00000000000000 --- a/lib/v2/vlive/index.js +++ /dev/null @@ -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, '

').replace(/\n/g, '
'), - 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, - }; -}; diff --git a/lib/v2/vlive/maintainer.js b/lib/v2/vlive/maintainer.js deleted file mode 100644 index db802c5eb517c4..00000000000000 --- a/lib/v2/vlive/maintainer.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - '/channel/:channel/board/:board': ['TonyRL'], -}; diff --git a/lib/v2/vlive/radar.js b/lib/v2/vlive/radar.js deleted file mode 100644 index 7783c30dfe3b52..00000000000000 --- a/lib/v2/vlive/radar.js +++ /dev/null @@ -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', - }, - ], - }, -}; diff --git a/lib/v2/vlive/router.js b/lib/v2/vlive/router.js deleted file mode 100644 index fb3c0f7ecea3ce..00000000000000 --- a/lib/v2/vlive/router.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = (router) => { - router.get('/channel/:channel/board/:board', require('./index')); -}; diff --git a/lib/v2/vlive/templates/post.art b/lib/v2/vlive/templates/post.art deleted file mode 100644 index 208ee05d014cdd..00000000000000 --- a/lib/v2/vlive/templates/post.art +++ /dev/null @@ -1,8 +0,0 @@ -{{ if post }} -{{@ post }} -{{ /if }} -{{ if images }} -{{ each images image }} - -{{ /each }} -{{ /if }} diff --git a/lib/v2/vlive/templates/video.art b/lib/v2/vlive/templates/video.art deleted file mode 100644 index 33e880a138642c..00000000000000 --- a/lib/v2/vlive/templates/video.art +++ /dev/null @@ -1,3 +0,0 @@ -{{ if image }} - -{{ /if }} diff --git a/lib/v2/wangqiutiyu/anchor.js b/lib/v2/wangqiutiyu/anchor.js deleted file mode 100644 index 196e5f484c87fc..00000000000000 --- a/lib/v2/wangqiutiyu/anchor.js +++ /dev/null @@ -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>vId=${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], - }; -}; diff --git a/lib/v2/wangqiutiyu/maintainer.js b/lib/v2/wangqiutiyu/maintainer.js deleted file mode 100644 index 9642a8424f8c45..00000000000000 --- a/lib/v2/wangqiutiyu/maintainer.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - '/anchor/:id': ['nczitzk'], -}; diff --git a/lib/v2/wangqiutiyu/radar.js b/lib/v2/wangqiutiyu/radar.js deleted file mode 100644 index 12996da50273f6..00000000000000 --- a/lib/v2/wangqiutiyu/radar.js +++ /dev/null @@ -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', - }, - ], - }, -}; diff --git a/lib/v2/wangqiutiyu/router.js b/lib/v2/wangqiutiyu/router.js deleted file mode 100644 index ee997ddc4927f0..00000000000000 --- a/lib/v2/wangqiutiyu/router.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function (router) { - router.get('/anchor/:id', require('./anchor')); -}; diff --git a/website/docs/routes/live.mdx b/website/docs/routes/live.mdx index b2c75cb271e0e0..1e92b84d4f6ef7 100644 --- a/website/docs/routes/live.mdx +++ b/website/docs/routes/live.mdx @@ -10,12 +10,6 @@ -## SHOWROOM 直播 {#showroom-zhi-bo} - -### 直播间开播 {#showroom-zhi-bo-zhi-bo-jian-kai-bo} - - - ## Twitch {#twitch} ### Live {#twitch-live} @@ -34,12 +28,6 @@ -## V LIVE {#v-live} - -### Board {#v-live-board} - - - ## Yoasobi Official {#yoasobi-official} ### News & Biography {#yoasobi-official-news-biography} @@ -101,33 +89,3 @@ ### 直播间开播 {#lang-play-zhi-bo-zhi-bo-jian-kai-bo} - -## 猎趣 TV {#lie-qu-tv} - -### 直播间开播 {#lie-qu-tv-zhi-bo-jian-kai-bo} - - - -## 企鹅电竞 {#qi-e-dian-jing} - -### 直播间开播 {#qi-e-dian-jing-zhi-bo-jian-kai-bo} - - - -## 企鹅直播 {#qi-e-zhi-bo} - -### 直播间开播 {#qi-e-zhi-bo-zhi-bo-jian-kai-bo} - - - -## 旺球体育 {#wang-qiu-ti-yu} - -### 直播间开播 {#wang-qiu-ti-yu-zhi-bo-jian-kai-bo} - - - -## 战旗直播 {#zhan-qi-zhi-bo} - -### 直播间开播 {#zhan-qi-zhi-bo-zhi-bo-jian-kai-bo} - -