fix: rs05 change origin and path (#4671)

This commit is contained in:
howel52 2020-05-06 20:01:24 +08:00 committed by GitHub
parent 451b05a654
commit 1ea17c6e58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 9 deletions

View File

@ -4,20 +4,19 @@ const cheerio = require('cheerio');
module.exports = async (ctx) => {
const response = await got({
method: 'get',
url: 'http://www.rs05.com/movie/',
url: 'http://www.wuhaozhan.net/movie/list/',
headers: {
Referer: 'http://www.rs05.com/movie/',
Referer: 'http://www.wuhaozhan.net/movie/list/',
},
});
const data = response.data;
const $ = cheerio.load(data);
const list = $('.list ul li');
const list = $('.pure-g .l-box');
ctx.state.data = {
title: '人生05电影更新列表',
link: 'http://www.rs05.com/movie/',
link: 'http://www.wuhaozhan.net/movie/list/',
description: '人生05电影更新列表',
item:
list &&
@ -25,10 +24,10 @@ module.exports = async (ctx) => {
.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'),
title: item.find('.pr h1 a').text(),
description: item.find('.pr h2').text() + '<img src="' + item.find('.pure-g iframe').attr('src') + '">',
pubDate: item.find('.pr .dt').text(),
link: item.find('.l-a').attr('href'),
};
})
.get(),