增加人生05的电影下载网站 (#1459)

This commit is contained in:
monnerHenster 2019-01-28 17:47:20 +08:00 committed by DIYgod
parent 5c2813e43e
commit 79d449b5f1
3 changed files with 43 additions and 0 deletions

View File

@ -946,6 +946,10 @@ GitHub 官方也提供了一些 RSS:
<route name="新片精品" author="imgss" example="/dytt" path="/dytt"/>
### rs05 人生 05 电影
<route name="rs05电影列表" author="monner-henster" example="/rs05/rs05" path="/rs05/rs05"/>
### 优酷
<route name="频道" author="xyqfer" example="/youku/channel/UNTg3MTM3OTcy" path="/youku/channel/:channelId/:embed?" :paramsDesc="['频道 id', '默认为开启内嵌视频, 任意值为关闭']"/>

View File

@ -744,6 +744,9 @@ router.get('/kirara/news', require('./routes/kirara/news'));
router.get('/dytt', require('./routes/dytt/index'));
router.get('/dytt/index', require('./routes/dytt/index')); // 兼容
// 人生05电影网
router.get('/rs05/rs05', require('./routes/rs05/rs05'));
// 趣头条
router.get('/qutoutiao/category/:cid', require('./routes/qutoutiao/category'));

36
lib/routes/rs05/rs05.js Normal file
View File

@ -0,0 +1,36 @@
const axios = require('../../utils/axios');
const cheerio = require('cheerio');
module.exports = async (ctx) => {
const response = await axios({
method: 'get',
url: 'http://www.rs05.com/movie/',
headers: {
Referer: 'http://www.rs05.com/movie/',
},
});
const data = response.data;
const $ = cheerio.load(data);
const list = $('.list ul li');
ctx.state.data = {
title: '人生05电影更新列表',
link: 'http://www.rs05.com/movie/',
description: '人生05电影更新列表',
item:
list &&
list
.map((index, item) => {
item = $(item);
return {
title: item.find('.intro h2 a').attr('title'),
description: item.find('.brief').text() + '<img src="' + item.find('.movie-thumbnails .pure-img').attr('data-original') + '">',
pubDate: new Date(item.find('.time').data('shared-at')).toUTCString(),
link: item.find('.intro h2 a').attr('href'),
};
})
.get(),
};
};