mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
feat: add 绅士漫画 (#4241)
This commit is contained in:
@@ -266,3 +266,9 @@ pageClass: routes
|
||||
### 最新汉化
|
||||
|
||||
<Route author="junfengP" example="/zdfx" path="/zdfx"/>
|
||||
|
||||
## 紳士漫畫
|
||||
|
||||
### 最新
|
||||
|
||||
<Route author="KenMizz" example="/ssmh" path="/ssmh/">
|
||||
|
||||
@@ -541,6 +541,9 @@ router.get('/sayhuahuo', require('./routes/galgame/sayhuahuo'));
|
||||
// 终点分享
|
||||
router.get('/zdfx', require('./routes/galgame/zdfx'));
|
||||
|
||||
// 紳士漫畫
|
||||
router.get('/ssmh', require('./routes/ssmh'));
|
||||
|
||||
// 北京理工大学
|
||||
router.get('/bit/jwc', require('./routes/universities/bit/jwc/jwc'));
|
||||
router.get('/bit/cs', require('./routes/universities/bit/cs/cs'));
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: 'https://wnacg.org/albums.html',
|
||||
});
|
||||
|
||||
const data = response.data;
|
||||
|
||||
const $ = cheerio.load(data);
|
||||
const list = $('.pic_box');
|
||||
let thumbnail_url;
|
||||
let link_url;
|
||||
ctx.state.data = {
|
||||
title: '紳士漫畫',
|
||||
link: 'https://wnacg.org/albums.html',
|
||||
item: list
|
||||
.map((index, item) => {
|
||||
item = $(item);
|
||||
thumbnail_url = 'https://wnacg.org' + `${item.find('a > img').attr('src')}`;
|
||||
link_url = 'https://wnacg.org' + `${item.find('a').attr('href')}`;
|
||||
return {
|
||||
title: item.find('a').attr('title'),
|
||||
description: `<img src=${thumbnail_url} referrerpolicy="no-referrer">`,
|
||||
link: link_url,
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user