From 48865c439e215b9913ca03656647ec754f01d91b Mon Sep 17 00:00:00 2001 From: Henry Wang Date: Mon, 1 Jun 2020 05:18:37 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20/cfd/gbp=5Fdiv=20DOM=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=20(#4888)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/cfd/gbp_div.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/cfd/gbp_div.js b/lib/routes/cfd/gbp_div.js index 058e98a18..d1978a30c 100644 --- a/lib/routes/cfd/gbp_div.js +++ b/lib/routes/cfd/gbp_div.js @@ -8,7 +8,7 @@ module.exports = async (ctx) => { const $ = cheerio.load(response.data); - const title = $('.news-table-wrapper')[0].prev.prev.children[2].data.replace('*', ''); + const title = $($('.news-table-wrapper')[0]).prev().text().replace('*', ''); const pubDate = dateParser($('meta[itemprop="datePublished"]').attr('content'), 'YYYY-MM-DD-HH:mm');