rss: remove reimu
This commit is contained in:
parent
2cfc0a32ef
commit
1bd45821c0
|
|
@ -178,9 +178,6 @@ RSSHub 是一个轻量、易于扩展的 RSS 生成器,可以给任何奇奇
|
|||
- 米哈游
|
||||
- 崩坏 2-游戏公告
|
||||
- 崩坏 3-游戏公告
|
||||
- 灵梦御所
|
||||
- 分类
|
||||
- 标签
|
||||
- 草榴
|
||||
- 分区帖子
|
||||
- 科技星球
|
||||
|
|
|
|||
|
|
@ -1488,28 +1488,6 @@ id, 专辑 id, 可在对应专辑页面的 URL 中找到
|
|||
| ------ | ------ | ---- | -------- | -------- |
|
||||
| latest | notice | news | activity | strategy |
|
||||
|
||||
## 灵梦御所
|
||||
|
||||
### 分类 <Author uid="deepred5"/>
|
||||
|
||||
举例: [https://rsshub.app/reimu/category/music](https://rsshub.app/reimu/category/music)
|
||||
|
||||
路由: `/reimu/category/:category`
|
||||
|
||||
参数:category,分类名
|
||||
|
||||
| 3d | 动画 | 合集 | 图包 | 壁纸 | 御所汉化 | 游戏 | 漫画 | 独立 | 表番推荐 | 音声 |
|
||||
| --- | ----- | ---------- | ------- | --------- | -------- | ---- | ----- | ----- | --------- | ----- |
|
||||
| 3d | anime | collection | picture | wallpaper | chinese | game | comic | indie | recommend | music |
|
||||
|
||||
### 标签 <Author uid="deepred5"/>
|
||||
|
||||
举例: [https://rsshub.app/reimu/tag/ntr](https://rsshub.app/reimu/tag/ntr)
|
||||
|
||||
路由: `/reimu/tag/:tag`
|
||||
|
||||
参数:tag,标签名,例如: **ntr**, **rbq**, **凌辱**
|
||||
|
||||
## 草榴社区
|
||||
|
||||
### 分区帖子 <Author uid="zhboner"/>
|
||||
|
|
|
|||
|
|
@ -325,10 +325,6 @@ router.get('/miui/:device/:type?', require('./routes/miui/index'));
|
|||
router.get('/mihoyo/bh3/:type', require('./routes/mihoyo/bh3'));
|
||||
router.get('/mihoyo/bh2/:type', require('./routes/mihoyo/bh2'));
|
||||
|
||||
// 灵梦御所
|
||||
router.get('/reimu/category/:category', require('./routes/reimu/category'));
|
||||
router.get('/reimu/tag/:tag', require('./routes/reimu/tag'));
|
||||
|
||||
// 央视新闻
|
||||
router.get('/cctv/:category', require('./routes/cctv/category'));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
const util = require('./util');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
let category = ctx.params.category;
|
||||
const categoryType = ['3d', 'anime', 'collection', 'picture', 'wallpaper', 'chinese', 'game', 'comic', 'indie', 'recommend', 'music'];
|
||||
|
||||
if (categoryType.indexOf(category) === -1) {
|
||||
category = categoryType[0];
|
||||
}
|
||||
|
||||
const url = `https://blog.reimu.net/archives/category/${category}`;
|
||||
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: url,
|
||||
},
|
||||
});
|
||||
|
||||
const data = response.data;
|
||||
const $ = cheerio.load(data);
|
||||
|
||||
const articles = $('article');
|
||||
const title = $('title').text();
|
||||
|
||||
ctx.state.data = {
|
||||
title: title,
|
||||
link: url,
|
||||
description: title,
|
||||
item: util.getArticleData(articles, $),
|
||||
};
|
||||
};
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
const util = require('./util');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const tag = ctx.params.tag || 'ntr';
|
||||
|
||||
const url = `https://blog.reimu.net/archives/tag/${tag}`;
|
||||
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: encodeURI(url), // encode中文标签
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
|
||||
const data = response.data;
|
||||
const $ = cheerio.load(data);
|
||||
|
||||
const articles = $('article');
|
||||
const title = $('title').text();
|
||||
|
||||
ctx.state.data = {
|
||||
title: title,
|
||||
link: url,
|
||||
description: title,
|
||||
item: util.getArticleData(articles, $),
|
||||
};
|
||||
};
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
const util = {
|
||||
getArticleData(articles, $) {
|
||||
if (!articles) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return articles
|
||||
.map((index, article) => {
|
||||
article = $(article);
|
||||
const title = article.find('h2').text();
|
||||
const description = article.find('.entry-content').text();
|
||||
const pubDate = new Date(article.find('.entry-date').attr('datetime')).toUTCString();
|
||||
const link = article.find('a[rel=bookmark]').attr('href');
|
||||
|
||||
return {
|
||||
title,
|
||||
description,
|
||||
pubDate,
|
||||
link,
|
||||
};
|
||||
})
|
||||
.get();
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = util;
|
||||
Loading…
Reference in New Issue