fix: mofcom css selector changed (#5879) (#5883)

This commit is contained in:
Queensferry
2020-10-18 02:41:18 +01:00
committed by GitHub
parent 5cb7a4a6ad
commit 6312b28f08
+2 -2
View File
@@ -10,7 +10,7 @@ module.exports = async (ctx) => {
const res = await got.get(url);
const $ = cheerio.load(res.data);
const title = $('head > title').text();
const list = $('.u-newsList01.f-mt10 li').get();
const list = $('.txtList_01 li').get();
const out = await Promise.all(
list.map(async (item) => {
@@ -40,7 +40,7 @@ module.exports = async (ctx) => {
const single = {
title,
link: itemUrl,
description: $d('.artCon').html() || $d('.textlive').html(),
description: $d('.art-con').html() || $d('.textlive').html(),
};
ctx.cache.set(itemUrl, JSON.stringify(single));
return Promise.resolve(single);