fix(route/zhonglun): 修复中伦律师事务所研究文章页面改版导致数据无法获取 (#17527)
This commit is contained in:
parent
6895333c05
commit
7b1c166a60
|
|
@ -20,22 +20,21 @@ export const handler = async (ctx) => {
|
|||
|
||||
const $ = load(response);
|
||||
|
||||
let items = $('div#dataList h3')
|
||||
let items = $('div#dataList > dl > dd, div#dataList > ul > li')
|
||||
.slice(0, limit)
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
|
||||
const title = item.text();
|
||||
const description = art(path.join(__dirname, 'templates/description.art'), {
|
||||
intro: item.next().text(),
|
||||
intro: item.find('p').text(),
|
||||
});
|
||||
|
||||
return {
|
||||
title,
|
||||
title: item.find('h3 > a').text(),
|
||||
description,
|
||||
pubDate: parseDate(item.find('span').first().text()),
|
||||
link: item.find('a').prop('href'),
|
||||
pubDate: parseDate(item.find('span').text()),
|
||||
link: item.find('h3 > a').prop('href'),
|
||||
language,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue