diff --git a/docs/en/multimedia.md b/docs/en/multimedia.md index 78ace50423..7f6b2deb50 100644 --- a/docs/en/multimedia.md +++ b/docs/en/multimedia.md @@ -2,7 +2,7 @@ pageClass: routes --- -# Multimedia +# Multimedia ## 60-Second Science - Scientific American @@ -28,6 +28,12 @@ Official RSS: https://eztv.io/ezrss.xml +## Hentaimama + +### Recent Videos + + + ## JavLibrary ### Videos diff --git a/docs/multimedia.md b/docs/multimedia.md index ce7671bb5a..e113504aa5 100644 --- a/docs/multimedia.md +++ b/docs/multimedia.md @@ -75,6 +75,12 @@ pageClass: routes +## Hentaimama + +### 近期更新 + + + ## JavBus ### 首页 diff --git a/lib/router.js b/lib/router.js index f52040d541..ca25e9ce92 100644 --- a/lib/router.js +++ b/lib/router.js @@ -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; diff --git a/lib/routes/hentaimama/videos.js b/lib/routes/hentaimama/videos.js new file mode 100644 index 0000000000..e3b88af86d --- /dev/null +++ b/lib/routes/hentaimama/videos.js @@ -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: '', + pubDate: item.find('.data span').text(), + guid: new Date(item.find('.data span').text()), + link: item.find('a').attr('href'), + }; + }) + .get(), + }; +};