mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-08 05:59:00 +08:00
add Vol.mol (#1538)
add Vol.moe 
This commit is contained in:
@@ -1163,6 +1163,16 @@ GitHub 官方也提供了一些 RSS:
|
||||
|
||||
</route>
|
||||
|
||||
### Vol.moe
|
||||
|
||||
<route name="vol" author="CoderTonyChan" example="/vol/finsh" path="/vol/:mode?" :paramsDesc="['模式']">
|
||||
|
||||
| 连载 | 完结 |
|
||||
| ------ | ----- |
|
||||
| serial | finsh |
|
||||
|
||||
</route>
|
||||
|
||||
### ebb.io
|
||||
|
||||
<route name="ebb" author="Tsuki" example="/ebb" path="/ebb"/>
|
||||
|
||||
@@ -249,6 +249,16 @@ For private channels, pass the channel `id` (such as `-1001001234567`) intstead
|
||||
|
||||
<routeEn name="Sticker Pack" author="DIYgod" example="/telegram/stickerpack/DIYgod" path="/telegram/stickerpack/:name" :paramsDesc="['Sticker Pack name, available in the sharing URL']"/>
|
||||
|
||||
## ACG
|
||||
|
||||
### Vol.moe
|
||||
|
||||
<route name="vol" author="CoderTonyChan" example="/vol/finsh" path="/vol/:mode?" :paramsDesc="['mode type']">
|
||||
|
||||
| Comics are serialized | Comics is finshed |
|
||||
| --------------------- | ----------------- |
|
||||
| serial | finsh |
|
||||
|
||||
## Travel
|
||||
|
||||
### All the Flight Deals
|
||||
|
||||
@@ -868,6 +868,8 @@ router.get('/tencentvideo/playlist/:id', require('./routes/tencent/video/playlis
|
||||
router.get('/manhuagui/comic/:id', require('./routes/manhuagui/comic'));
|
||||
// 動漫狂
|
||||
router.get('/cartoonmad/comic/:id', require('./routes/cartoonmad/comic'));
|
||||
// Vol
|
||||
router.get('/vol/:mode?', require('./routes/vol/lastupdate'));
|
||||
|
||||
// Tits Guru
|
||||
router.get('/tits-guru/home', require('./routes/titsguru/home'));
|
||||
|
||||
52
lib/routes/vol/lastupdate.js
Normal file
52
lib/routes/vol/lastupdate.js
Normal file
@@ -0,0 +1,52 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
let mode = ctx.params.mode;
|
||||
let title = ``;
|
||||
if (mode === 'serial') {
|
||||
mode = '%E9%80%A3%E8%BC%89';
|
||||
title = `Vol.moe - serial`;
|
||||
} else if (mode === 'finish') {
|
||||
mode = '%E5%AE%8C%E7%B5%90';
|
||||
title = `Vol.moe - finish`;
|
||||
} else {
|
||||
mode = 'all';
|
||||
title = `Vol.moe`;
|
||||
}
|
||||
const link = `http://vol.moe/list/all,all,${mode},lastupdate,all,all,none/`;
|
||||
const listData = await axios.get(link);
|
||||
const $list = cheerio.load(listData.data);
|
||||
const items = $list('.listbg td')
|
||||
.map((_, el) => {
|
||||
const $el = $list(el);
|
||||
const title = $el
|
||||
.find('a')
|
||||
.last()
|
||||
.text();
|
||||
const imgEL = $el.find('a').first();
|
||||
const link = imgEL.attr('href');
|
||||
const imgSrc = imgEL.find('.img_book').attr('src');
|
||||
const match = $el.text().match(/\[[\s\S]*?\]/g);
|
||||
const detail = $el.find('.pagefoot').text();
|
||||
const date = $el.find('.filesize').text();
|
||||
return {
|
||||
title: `${title} ${detail} ${match}`,
|
||||
description: `
|
||||
<img referrerpolicy="no-referrer" src="${imgSrc}" />
|
||||
<h1>${title}</h1>
|
||||
<h2>${match}</h2>
|
||||
<h2>${detail}</h2>
|
||||
<h2>${date}</h2>
|
||||
`.trim(),
|
||||
link: link,
|
||||
pubDate: new Date(date).toUTCString(),
|
||||
};
|
||||
})
|
||||
.get();
|
||||
ctx.state.data = {
|
||||
title,
|
||||
link,
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user