From 1ea17c6e58db446797c1f9d5abc41bad4f09bc8d Mon Sep 17 00:00:00 2001 From: howel52 Date: Wed, 6 May 2020 20:01:24 +0800 Subject: [PATCH] fix: rs05 change origin and path (#4671) --- lib/routes/rs05/rs05.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/routes/rs05/rs05.js b/lib/routes/rs05/rs05.js index a58cbc043..3cacfb132 100644 --- a/lib/routes/rs05/rs05.js +++ b/lib/routes/rs05/rs05.js @@ -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() + '', - 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() + '', + pubDate: item.find('.pr .dt').text(), + link: item.find('.l-a').attr('href'), }; }) .get(),