mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix: 修复联合早报抓取 (#3462)
This commit is contained in:
@@ -24,7 +24,7 @@ const got_ins = got.extend({
|
||||
const parseList = async (ctx, sectionUrl) => {
|
||||
const response = await got_ins.get(baseUrl + sectionUrl);
|
||||
const $ = cheerio.load(response.data);
|
||||
const data = $('.row.list', '.post-list').find('.content');
|
||||
const data = $('.article-list').find('.article-type');
|
||||
|
||||
const title = $('#breadcrumbs > a')
|
||||
.toArray()
|
||||
@@ -49,17 +49,18 @@ const parseList = async (ctx, sectionUrl) => {
|
||||
const article = await got_ins.get(link);
|
||||
const $1 = cheerio.load(article.data);
|
||||
|
||||
const time = $1('.datestamp.date-published.meta-date-published', '.body-content')
|
||||
const time = $1('.title-byline.date-published', '.content')
|
||||
.slice(0, 1)
|
||||
.text()
|
||||
.replace('年', '-')
|
||||
.replace('月', '-')
|
||||
.replace('日', '')
|
||||
.replace('发布/', '');
|
||||
.replace('发布 /', '');
|
||||
|
||||
const description = $1('.article-content-container').html();
|
||||
const description = $1('.article-content').html();
|
||||
|
||||
resultItem = {
|
||||
title: $1('h1', '.body-content').text(),
|
||||
title: $1('h1', '.content').text(),
|
||||
description: description,
|
||||
pubDate: new Date(time).toUTCString(),
|
||||
link: link,
|
||||
|
||||
Reference in New Issue
Block a user