feat: add hentaimama (#5368)

Co-authored-by: everyone <everyone@disroot.org>
Co-authored-by: Henry <hi@henry.wang>
This commit is contained in:
everyonus
2020-08-28 14:10:55 -07:00
committed by GitHub
parent ea5428e12b
commit cc33fecd6f
4 changed files with 48 additions and 1 deletions

View File

@@ -2,7 +2,7 @@
pageClass: routes
---
# Multimedia
# Multimedia
## 60-Second Science - Scientific American
@@ -28,6 +28,12 @@ Official RSS: https://eztv.io/ezrss.xml
<RouteEn author="Songkeys" example="/eztv/torrents/6048596" path="/eztv/torrents/:imdb_id" :paramsDesc="['The IMDB ID corresponding to the seed of show you want to search can be found on the official website [IMDB](https://www.imdb.com)']" supportBT="1"/>
## Hentaimama
### Recent Videos
<RouteEn author="everyonus" example="/hentaimama/videos" path="/hentaimama/videos" />
## JavLibrary
### Videos

View File

@@ -75,6 +75,12 @@ pageClass: routes
<Route author="Songkeys" example="/eztv/torrents/6048596" path="/eztv/torrents/:imdb_id" :paramsDesc="['想搜寻的 show 的种子所对应的 IMDB ID, 可在 [IMDB](https://www.imdb.com) 官网找到']" supportBT="1"/>
## Hentaimama
### 近期更新
<Route author="everyonus" example="/hentaimama/videos" path="/hentaimama/videos" />
## JavBus
### 首页

View File

@@ -3128,4 +3128,7 @@ router.get('/guiltfree/onsale', require('./routes/guiltfree/onsale'));
// 消费明鉴
router.get('/mingjian', require('./routes/mingjian/index'));
// hentaimama
router.get('/hentaimama/videos', require('./routes/hentaimama/videos'));
module.exports = router;

View File

@@ -0,0 +1,32 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
module.exports = async (ctx) => {
const response = await got({
method: 'get',
url: 'http://hentaimama.io/recent-episodes/',
});
const data = response.data;
const $ = cheerio.load(data);
const list = $('.item.episodes');
ctx.state.data = {
title: 'Hentaimama - Recent Videos',
link: 'http://hentaimama.io/recent-episodes/',
language: 'en-us',
item: list
.map((index, item) => {
item = $(item);
return {
title: item.find('img').attr('alt'),
description: '<img src="' + item.find('img').attr('src') + '">',
pubDate: item.find('.data span').text(),
guid: new Date(item.find('.data span').text()),
link: item.find('a').attr('href'),
};
})
.get(),
};
};