mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 06:30:40 +08:00
@@ -44,6 +44,10 @@ pageClass: routes
|
|||||||
|
|
||||||
</RouteEn>
|
</RouteEn>
|
||||||
|
|
||||||
|
### Keyword
|
||||||
|
|
||||||
|
<Route author="DIYgod" example="/pixiv/search/麻衣/popular/2" path="/pixiv/search/:keyword/:order?/:r18?" :paramsDesc="['keyword', 'rank mode, empty or other for time order, popular for popular order', 'filte R18 content, 0 to no filter, 1 to only not R18, 2 to only R18, default to 0']" radar="1"/>
|
||||||
|
|
||||||
## Telegram
|
## Telegram
|
||||||
|
|
||||||
### Channel
|
### Channel
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ Tiny Tiny RSS 会给所有 iframe 元素添加 `sandbox="allow-scripts"` 属性
|
|||||||
|
|
||||||
### 关键词
|
### 关键词
|
||||||
|
|
||||||
<Route author="DIYgod" example="/pixiv/search/麻衣/popular" path="/pixiv/search/:keyword/:order?" :paramsDesc="['关键词', '排序方式,popular 按热门度排序,空或其他任意值按时间排序']" radar="1"/>
|
<Route author="DIYgod" example="/pixiv/search/麻衣/popular/2" path="/pixiv/search/:keyword/:order?/:r18?" :paramsDesc="['关键词', '排序方式,popular 按热门度排序,空或其他任意值按时间排序', '过滤 R18 内容,0 为不过滤,1 为只看非 R18 内容,2 为只看 R18 内容,默认为 0']" radar="1"/>
|
||||||
|
|
||||||
### 关注的新作品
|
### 关注的新作品
|
||||||
|
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ router.get('/pixiv/user/bookmarks/:id', require('./routes/pixiv/bookmarks'));
|
|||||||
router.get('/pixiv/user/illustfollows', require('./routes/pixiv/illustfollow'));
|
router.get('/pixiv/user/illustfollows', require('./routes/pixiv/illustfollow'));
|
||||||
router.get('/pixiv/user/:id/', require('./routes/pixiv/user'));
|
router.get('/pixiv/user/:id/', require('./routes/pixiv/user'));
|
||||||
router.get('/pixiv/ranking/:mode/:date?', require('./routes/pixiv/ranking'));
|
router.get('/pixiv/ranking/:mode/:date?', require('./routes/pixiv/ranking'));
|
||||||
router.get('/pixiv/search/:keyword/:order?', require('./routes/pixiv/search'));
|
router.get('/pixiv/search/:keyword/:order?/:r18?', require('./routes/pixiv/search'));
|
||||||
|
|
||||||
// 豆瓣
|
// 豆瓣
|
||||||
router.get('/douban/movie/playing', require('./routes/douban/playing'));
|
router.get('/douban/movie/playing', require('./routes/douban/playing'));
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ module.exports = async (ctx) => {
|
|||||||
|
|
||||||
const keyword = ctx.params.keyword;
|
const keyword = ctx.params.keyword;
|
||||||
const order = ctx.params.order || 'date';
|
const order = ctx.params.order || 'date';
|
||||||
|
const r18 = ctx.params.r18;
|
||||||
|
|
||||||
if (!getToken()) {
|
if (!getToken()) {
|
||||||
throw 'pixiv not login';
|
throw 'pixiv not login';
|
||||||
@@ -22,7 +23,12 @@ module.exports = async (ctx) => {
|
|||||||
response = await searchIllust(keyword, getToken());
|
response = await searchIllust(keyword, getToken());
|
||||||
}
|
}
|
||||||
|
|
||||||
const illusts = response.data.illusts;
|
let illusts = response.data.illusts;
|
||||||
|
if (r18 === '1') {
|
||||||
|
illusts = illusts.filter((item) => item.x_restrict === 0);
|
||||||
|
} else if (r18 === '2') {
|
||||||
|
illusts = illusts.filter((item) => item.x_restrict === 1);
|
||||||
|
}
|
||||||
|
|
||||||
ctx.state.data = {
|
ctx.state.data = {
|
||||||
title: `${keyword} 的 pixiv ${order === 'popular' ? '热门' : ''}内容`,
|
title: `${keyword} 的 pixiv ${order === 'popular' ? '热门' : ''}内容`,
|
||||||
@@ -44,5 +50,6 @@ module.exports = async (ctx) => {
|
|||||||
link: `https://www.pixiv.net/member_illust.php?mode=medium&illust_id=${illust.id}`,
|
link: `https://www.pixiv.net/member_illust.php?mode=medium&illust_id=${illust.id}`,
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
|
allowEmpty: true,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user