From b3b5a8ef7246ecdecf9051c95213f791dbd54dc6 Mon Sep 17 00:00:00 2001 From: yikZero <52102693+yikZero@users.noreply.github.com> Date: Mon, 21 Sep 2020 04:06:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B5=99=E5=B7=A5=E5=A4=A7=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E4=B8=8E=E5=BB=BA=E7=AD=91=E5=AD=A6=E9=99=A2descripti?= =?UTF-8?q?on=E9=83=A8=E5=88=86=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=85=A8=20(#56?= =?UTF-8?q?69)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/university.md | 8 ++++---- lib/routes/universities/zjut/design.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/university.md b/docs/university.md index 6fd571989..3f6a20ac8 100644 --- a/docs/university.md +++ b/docs/university.md @@ -1766,11 +1766,11 @@ type 列表: ### 设计与建筑学院 - + -| 学术科研 | 学院新闻 | 公告通知 | 学术交流 | -| -------- | -------- | -------- | -------- | -| 5 | 16 | 18 | 20 | +| 学院新闻 | 公告通知 | 学术交流 | +| -------- | -------- | -------- | +| 16 | 18 | 20 | diff --git a/lib/routes/universities/zjut/design.js b/lib/routes/universities/zjut/design.js index 416f7984a..bb9ee36ac 100644 --- a/lib/routes/universities/zjut/design.js +++ b/lib/routes/universities/zjut/design.js @@ -43,8 +43,8 @@ module.exports = async (ctx) => { } const itemReponse = await got({ method: 'get', url: link, responseType: 'buffer' }); - const itemElement = cheerio.load(iconv.decode(itemReponse.data, 'gbk')); - item.description = itemElement('#jiacu').html(); + const itemElement = cheerio.load(iconv.decode(itemReponse.data, 'utf-8')); + item.description = itemElement('div[style="line-height:27px;"]').html(); ctx.cache.set(link, JSON.stringify(item)); return Promise.resolve(item);