mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-08 14:07:54 +08:00
37 lines
1.2 KiB
JavaScript
37 lines
1.2 KiB
JavaScript
const got = require('@/utils/got');
|
|
const cheerio = require('cheerio');
|
|
|
|
module.exports = async (ctx) => {
|
|
const response = await got({
|
|
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 referrerpolicy="no-referrer" 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(),
|
|
};
|
|
};
|