Merge remote-tracking branch 'origin/master' into feature/esm
This commit is contained in:
commit
c5b37ee8c0
|
|
@ -10,7 +10,7 @@
|
|||
core enhancement:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['lib/routes/index.ts']
|
||||
- all-globs-to-any-file: ['lib/**', '!/lib/config.ts', '!lib/routes/**']
|
||||
- all-globs-to-any-file: ['lib/**', '!lib/config.ts', '!lib/router.js', '!lib/routes/**', '!lib/routes-deprecated/**']
|
||||
|
||||
dependencies:
|
||||
- changed-files:
|
||||
|
|
|
|||
|
|
@ -433,8 +433,8 @@ router.get('/miniflux/subscription/:parameters?', lazyloadRouteHandler('./routes
|
|||
router.get('/miniflux/:feeds/:parameters?', lazyloadRouteHandler('./routes/miniflux/get-entries'));
|
||||
|
||||
// 動畫瘋
|
||||
router.get('/anigamer/new_anime', lazyloadRouteHandler('./routes/anigamer/new-anime'));
|
||||
router.get('/anigamer/anime/:sn', lazyloadRouteHandler('./routes/anigamer/anime'));
|
||||
// router.get('/anigamer/new_anime', lazyloadRouteHandler('./routes/anigamer/new-anime'));
|
||||
// router.get('/anigamer/anime/:sn', lazyloadRouteHandler('./routes/anigamer/anime'));
|
||||
|
||||
// 中国药科大学
|
||||
router.get('/cpu/home', lazyloadRouteHandler('./routes/universities/cpu/home'));
|
||||
|
|
@ -1741,7 +1741,7 @@ router.get('/melon/chart/:category?', lazyloadRouteHandler('./routes/melon/chart
|
|||
// router.get('/zimuxia/:category?', lazyloadRouteHandler('./routes/zimuxia/index'));
|
||||
|
||||
// 东立出版
|
||||
router.get('/tongli/news/:type', lazyloadRouteHandler('./routes/tongli/news'));
|
||||
// router.get('/tongli/news/:type', lazyloadRouteHandler('./routes/tongli/news'));
|
||||
|
||||
// 海南大学
|
||||
router.get('/hainanu/ssszs', lazyloadRouteHandler('./routes/hainanu/ssszs'));
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { anime } = await got.get(`https://api.gamer.com.tw/mobile_app/anime/v1/video.php?sn=0&anime_sn=${ctx.params.sn}`).then((r) => r.data);
|
||||
ctx.state.data = {
|
||||
title: anime.title,
|
||||
link: `https://ani.gamer.com.tw/animeRef.php?sn=${anime.anime_sn}`,
|
||||
description: `<img src="${anime.cover}"> ` + anime.content.trim(),
|
||||
item: anime.volumes[0].map((item) => ({
|
||||
title: `${anime.title} 第 ${item.volume} 集`,
|
||||
link: `https://ani.gamer.com.tw/animeVideo.php?sn=${item.video_sn}`,
|
||||
})),
|
||||
};
|
||||
};
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
const got = require('@/utils/got');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
const timezone = require('@/utils/timezone');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const rootUrl = 'https://ani.gamer.com.tw';
|
||||
const response = await got.get('https://api.gamer.com.tw/mobile_app/anime/v3/index.php');
|
||||
const newAnime = response.data.data.newAnime;
|
||||
ctx.state.data = {
|
||||
title: '動畫瘋最後更新',
|
||||
link: `${rootUrl}/`,
|
||||
item: newAnime.date.map((item) => {
|
||||
const date = `${item.upTime} ${item.upTimeHours}`;
|
||||
return {
|
||||
title: `${item.title} ${item.volume}`,
|
||||
description: `<img src="${item.cover}">`,
|
||||
link: `${rootUrl}/animeVideo.php?sn=${item.videoSn}`,
|
||||
pubDate: timezone(parseDate(date, 'MM/DD HH:mm'), +8),
|
||||
};
|
||||
}),
|
||||
};
|
||||
};
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
module.exports = async (ctx) => {
|
||||
const { type } = ctx.params;
|
||||
const baseURL = 'https://www.tongli.com.tw/';
|
||||
const link = `${baseURL}TNews_List.aspx?Type=${type}&Page=1`;
|
||||
const res = await got.get(link);
|
||||
const $ = cheerio.load(res.data);
|
||||
const title = $('entry_title .n1').text();
|
||||
const _list = $('.news_list ul li')
|
||||
.map(function () {
|
||||
let link = $(this).find('.title a').attr('href');
|
||||
/^https?:\/\//.test(link) || (link = baseURL + link);
|
||||
return {
|
||||
title: $(this).find('.title a').text(),
|
||||
link,
|
||||
pubDate: new Date($(this).find('.date').text()),
|
||||
};
|
||||
})
|
||||
.get();
|
||||
const list = await Promise.all(
|
||||
_list.map(async (item) => {
|
||||
const { title, link, pubDate } = item;
|
||||
const description = await ctx.cache.tryGet(link, async () => {
|
||||
const res = await got.get(link);
|
||||
const $ = cheerio.load(res.data);
|
||||
if (/^https:\/\/tonglinv\.pixnet\.net/.test(link)) {
|
||||
return $('.article-content-inner').html();
|
||||
} else if (/^https?:\/\/blog\.xuite\.net\//.test(link)) {
|
||||
return $('#content_all').html();
|
||||
} else if (/TNews_View\.aspx/.test(link)) {
|
||||
return $('#ContentPlaceHolder1_TNewsContent').html();
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
});
|
||||
return { title, link, description, pubDate };
|
||||
})
|
||||
);
|
||||
ctx.state.data = {
|
||||
title,
|
||||
link,
|
||||
item: list,
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
import got from '@/utils/got';
|
||||
|
||||
export default async (ctx) => {
|
||||
const { sn } = ctx.req.param();
|
||||
|
||||
const { data: response } = await got('https://api.gamer.com.tw/mobile_app/anime/v3/video.php', {
|
||||
searchParams: {
|
||||
sn,
|
||||
},
|
||||
});
|
||||
|
||||
if (response.error) {
|
||||
throw new Error(response.error.message);
|
||||
}
|
||||
|
||||
const anime = response.data.anime;
|
||||
const title = anime.title.replaceAll(/\[\d+?]$/g, '').trim();
|
||||
|
||||
const items = anime.volumes[0]
|
||||
.map((item) => ({
|
||||
title: `${title} 第 ${item.volume} 集`,
|
||||
description: `<img src="${item.cover}">`,
|
||||
link: `https://ani.gamer.com.tw/animeVideo.php?sn=${item.video_sn}`,
|
||||
}))
|
||||
.toReversed();
|
||||
|
||||
ctx.set('data', {
|
||||
title,
|
||||
link: `https://ani.gamer.com.tw/animeRef.php?sn=${anime.anime_sn}`,
|
||||
description: anime.content?.trim(),
|
||||
item: items,
|
||||
});
|
||||
};
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
export default async (ctx) => {
|
||||
const rootUrl = 'https://ani.gamer.com.tw';
|
||||
const { data: response } = await got('https://api.gamer.com.tw/mobile_app/anime/v3/index.php');
|
||||
|
||||
const items = response.data.newAnime.date.map((item) => ({
|
||||
title: `${item.title} ${item.volume}`,
|
||||
description: `<img src="${item.cover}">`,
|
||||
link: `${rootUrl}/animeVideo.php?sn=${item.videoSn}`,
|
||||
pubDate: timezone(parseDate(`${item.upTime} ${item.upTimeHours}`, 'MM/DD HH:mm'), +8),
|
||||
}));
|
||||
|
||||
ctx.set('data', {
|
||||
title: '動畫瘋最後更新',
|
||||
link: rootUrl,
|
||||
item: items,
|
||||
});
|
||||
};
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
module.exports = {
|
||||
'/anime/:sn': ['maple3142'],
|
||||
'/gnn/:category?': ['Arracc'],
|
||||
'/hot/:bsn': ['nczitzk', 'TonyRL'],
|
||||
'/new_anime': ['maple3142'],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,15 +4,29 @@ module.exports = {
|
|||
acg: [
|
||||
{
|
||||
title: 'GNN 新聞',
|
||||
docs: 'https://docs.rsshub.app/routes/bbs#ba-ha-mu-te-dian-wan-zi-xun-zhan',
|
||||
docs: 'https://docs.rsshub.app/routes/anime#ba-ha-mu-te-dian-wan-zi-xun-zhan',
|
||||
source: ['/news.php'],
|
||||
target: (params, url) => `/gamer/gnn/${new URL(url).searchParams.get('p')}`,
|
||||
},
|
||||
],
|
||||
ani: [
|
||||
{
|
||||
title: '動畫瘋 - 最後更新',
|
||||
docs: 'https://docs.rsshub.app/routes/anime#ba-ha-mu-te-dian-wan-zi-xun-zhan',
|
||||
source: ['/'],
|
||||
target: '/gamer/new_anime',
|
||||
},
|
||||
{
|
||||
title: '動畫瘋 - 動畫',
|
||||
docs: 'https://docs.rsshub.app/routes/anime#ba-ha-mu-te-dian-wan-zi-xun-zhan',
|
||||
source: ['/animeVideo.php'],
|
||||
target: (_params, url) => `/gamer/anime/${new URL(url).searchParams.get('sn')}`,
|
||||
},
|
||||
],
|
||||
forum: [
|
||||
{
|
||||
title: '熱門推薦',
|
||||
docs: 'https://docs.rsshub.app/routes/bbs#ba-ha-mu-te-dian-wan-zi-xun-zhan',
|
||||
docs: 'https://docs.rsshub.app/routes/anime#ba-ha-mu-te-dian-wan-zi-xun-zhan',
|
||||
source: ['/A.php', '/B.php'],
|
||||
target: (params, url) => `/gamer/hot/${new URL(url).searchParams.get('bsn')}`,
|
||||
},
|
||||
|
|
@ -20,7 +34,7 @@ module.exports = {
|
|||
gnn: [
|
||||
{
|
||||
title: 'GNN 新聞',
|
||||
docs: 'https://docs.rsshub.app/routes/bbs#ba-ha-mu-te-dian-wan-zi-xun-zhan',
|
||||
docs: 'https://docs.rsshub.app/routes/anime#ba-ha-mu-te-dian-wan-zi-xun-zhan',
|
||||
source: ['/index.php'],
|
||||
target: (params, url) => `/gamer/gnn/${new URL(url).searchParams.get('k')}`,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
export default (router) => {
|
||||
router.get('/ani/anime/:sn', './ani/anime');
|
||||
router.get('/ani/new_anime', './ani/new-anime');
|
||||
router.get('/gnn/:category?', './gnn-index');
|
||||
router.get('/hot/:bsn', './hot');
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
'/news/:type': ['CokeMine'],
|
||||
};
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import * as cheerio from 'cheerio';
|
||||
|
||||
export default async (ctx) => {
|
||||
const { type } = ctx.req.param();
|
||||
const baseURL = 'https://www.tongli.com.tw/';
|
||||
const url = `${baseURL}TNews_List.aspx`;
|
||||
const { data: res, url: link } = await got(url, {
|
||||
searchParams: {
|
||||
Type: type,
|
||||
Page: 1,
|
||||
},
|
||||
});
|
||||
const $ = cheerio.load(res);
|
||||
|
||||
const list = $('.news_list ul li')
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
const a = item.find('.title a');
|
||||
return {
|
||||
title: a.text(),
|
||||
link: a.attr('href').startsWith('http') ? a.attr('href') : baseURL + a.attr('href'),
|
||||
pubDate: parseDate(item.find('.date').text(), 'YYYY.MM.DD'),
|
||||
};
|
||||
});
|
||||
|
||||
const items = await Promise.all(
|
||||
list.map((item) =>
|
||||
cache.tryGet(item.link, async () => {
|
||||
const { data: res } = await got(item.link);
|
||||
const $ = cheerio.load(res);
|
||||
|
||||
if (/^https:\/\/tonglinv\.pixnet\.net/.test(item.link)) {
|
||||
item.description = $('.article-content-inner').html();
|
||||
} else if (/^https?:\/\/blog\.xuite\.net\//.test(item.link)) {
|
||||
item.description = $('#content_all').html();
|
||||
} else if (/TNews_View\.aspx/.test(item.link)) {
|
||||
item.description = $('#ContentPlaceHolder1_TNewsContent').html();
|
||||
} else {
|
||||
item.description = '';
|
||||
}
|
||||
|
||||
return item;
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
ctx.set('data', {
|
||||
title: $('.entry_title .n1').text(),
|
||||
link,
|
||||
item: items,
|
||||
});
|
||||
};
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
module.exports = {
|
||||
'tongli.com.tw': {
|
||||
_name: '東立出版社',
|
||||
'.': [
|
||||
{
|
||||
title: '新聞',
|
||||
docs: 'https://docs.rsshub.app/routes/reading#dong-li-chu-ban-she',
|
||||
source: ['/TNews_List.aspx'],
|
||||
target: (_param, url) => {
|
||||
const searchParams = new URL(url).searchParams;
|
||||
return searchParams.has('Type') ? `/tongli/news/${searchParams.get('Type')}` : null;
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
export default (router) => {
|
||||
router.get('/news/:type', '/news');
|
||||
};
|
||||
|
|
@ -556,6 +556,32 @@ You can use some RSS parsing libraries (like `feedpraser` in `Python`) to receiv
|
|||
|
||||
<Route author="xueli-sherryli" example="/oreno3d/origins/3/latest/1" path="/oreno3d/origins/:originid/:sort/:pagelimit?" paramsDesc={['Origin id, can be found in URL' , 'Sort method, see the table above', 'The maximum number of pages to be crawled, the default is 1']} radar="1" />
|
||||
|
||||
## 巴哈姆特電玩資訊站 {#ba-ha-mu-te-dian-wan-zi-xun-zhan}
|
||||
|
||||
### GNN 新聞 {#ba-ha-mu-te-dian-wan-zi-xun-zhan-gnn-xin-wen}
|
||||
|
||||
<Route author="Arracc" example="/gamer/gnn/1" path="/gamer/gnn/:category?" paramsDesc={['版块']} notOperational="1">
|
||||
| 首頁 | PC | TV 掌機 | 手機遊戲 | 動漫畫 | 主題報導 | 活動展覽 | 電競 |
|
||||
| ---- | -- | ------- | -------- | ------ | -------- | -------- | ---- |
|
||||
| 缺省 | 1 | 3 | 4 | 5 | 9 | 11 | 13 |
|
||||
|
||||
| Switch | PS5 | PS4 | XboxOne | XboxSX | PC 單機 | PC 線上 | iOS | Android | Web | 漫畫 | 動畫 |
|
||||
| ------ | --- | --- | ------- | ------ | ------- | ------- | --- | ------- | --- | ----- | ----- |
|
||||
| ns | ps5 | ps4 | xbone | xbsx | pc | olg | ios | android | web | comic | anime |
|
||||
</Route>
|
||||
|
||||
### 熱門推薦 {#ba-ha-mu-te-dian-wan-zi-xun-zhan-re-men-tui-jian}
|
||||
|
||||
<Route author="nczitzk" example="/gamer/hot/47157" path="/gamer/hot/:bsn" paramsDesc={['板块 id,在 URL 可以找到']} />
|
||||
|
||||
### 動畫瘋 - 最後更新 {#ba-ha-mu-te-dian-wan-zi-xun-zhan-dong-hua-feng-zui-hou-geng-xin}
|
||||
|
||||
<Route author="maple3142" example="/gamer/ani/new_anime" path="/gamer/ani/new_anime" />
|
||||
|
||||
### 動畫瘋 - 動畫 {#ba-ha-mu-te-dian-wan-zi-xun-zhan-dong-hua-feng-dong-hua}
|
||||
|
||||
<Route author="maple3142" example="/gamer/ani/anime/36868" path="/gamer/ani/anime/:sn" paramsDesc={['動畫 sn,在 URL 可以找到']} radar="1" />
|
||||
|
||||
## 包子漫画 {#bao-zi-man-hua}
|
||||
|
||||
### 订阅漫画 {#bao-zi-man-hua-ding-yue-man-hua}
|
||||
|
|
@ -578,16 +604,6 @@ You can use some RSS parsing libraries (like `feedpraser` in `Python`) to receiv
|
|||
| manhuaqingbao | qingxiaoshuoqingbao | manhuazhoubian | shengyouqingbao | yinyuezixun | youxizixun | meituxinshang | manzhanqingbao | dazahui |
|
||||
</Route>
|
||||
|
||||
## 動畫瘋 {#dong-hua-feng}
|
||||
|
||||
### 最後更新 {#dong-hua-feng-zui-hou-geng-xin}
|
||||
|
||||
<Route author="maple3142" example="/anigamer/new_anime" path="/anigamer/new_anime" />
|
||||
|
||||
### 動畫 {#dong-hua-feng-dong-hua}
|
||||
|
||||
<Route author="maple3142" example="/anigamer/anime/90003" path="/anigamer/anime/:sn" paramsDesc={['動畫 sn']} notOperational="1" />
|
||||
|
||||
## 動漫狂 {#dong-man-kuang}
|
||||
|
||||
### 漫画更新 {#dong-man-kuang-man-hua-geng-xin}
|
||||
|
|
|
|||
|
|
@ -374,12 +374,6 @@ If you opt to enable `fulltext` feature, consider adding `limit` parameter to yo
|
|||
|
||||
<Route author="TonyRL" example="/zuvio/student5/boards" path="/zuvio/student5/boards" />
|
||||
|
||||
## 巴哈姆特電玩資訊站 {#ba-ha-mu-te-dian-wan-zi-xun-zhan}
|
||||
|
||||
### 熱門推薦 {#ba-ha-mu-te-dian-wan-zi-xun-zhan-re-men-tui-jian}
|
||||
|
||||
<Route author="nczitzk" example="/gamer/hot/47157" path="/gamer/hot/:bsn" paramsDesc={['板块 id,在 URL 可以找到']} />
|
||||
|
||||
## 百度贴吧 {#bai-du-tie-ba}
|
||||
|
||||
### 帖子列表 {#bai-du-tie-ba-tie-zi-lie-biao}
|
||||
|
|
|
|||
|
|
@ -624,20 +624,6 @@ Due to the regional restrictions, an RSSHub deployment in China Mainland may not
|
|||
The year, month and day provided under UTC time zone are the same as the official website, so please ignore the specific time!!!
|
||||
</Route>
|
||||
|
||||
## 巴哈姆特 {#ba-ha-mu-te}
|
||||
|
||||
### GNN 新聞 {#ba-ha-mu-te-gnn-xin-wen}
|
||||
|
||||
<Route author="Arracc" example="/gamer/gnn/1" path="/gamer/gnn/:category?" paramsDesc={['版块']} notOperational="1">
|
||||
| 首頁 | PC | TV 掌機 | 手機遊戲 | 動漫畫 | 主題報導 | 活動展覽 | 電競 |
|
||||
| ---- | -- | ------- | -------- | ------ | -------- | -------- | ---- |
|
||||
| 缺省 | 1 | 3 | 4 | 5 | 9 | 11 | 13 |
|
||||
|
||||
| Switch | PS5 | PS4 | XboxOne | XboxSX | PC 單機 | PC 線上 | iOS | Android | Web | 漫畫 | 動畫 |
|
||||
| ------ | --- | --- | ------- | ------ | ------- | ------- | --- | ------- | --- | ----- | ----- |
|
||||
| ns | ps5 | ps4 | xbone | xbsx | pc | olg | ios | android | web | comic | anime |
|
||||
</Route>
|
||||
|
||||
## 触乐 {#chu-le}
|
||||
|
||||
### 栏目 {#chu-le-lan-mu}
|
||||
|
|
|
|||
|
|
@ -234,11 +234,11 @@
|
|||
| 0 | 1 | 2 | 3 | 4 | 6 |
|
||||
</Route>
|
||||
|
||||
## 东立出版 {#dong-li-chu-ban}
|
||||
## 東立出版社 {#dong-li-chu-ban-she}
|
||||
|
||||
### NEWS 资讯 {#dong-li-chu-ban-news-zi-xun}
|
||||
### 新聞 {#dong-li-chu-ban-she-xin-wen}
|
||||
|
||||
<Route author="CokeMine" example="/tongli/news/6" path="/tongli/news/:type" paramsDesc={['分类, 可以在“話題新聞”链接中找到']} />
|
||||
<Route author="CokeMine" example="/tongli/news/6" path="/tongli/news/:type" paramsDesc={['分類,可以在“新聞”鏈接中找到']} radar="1" />
|
||||
|
||||
## 飞地 {#fei-di}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue