fix: 浙工大设计与建筑学院description部分获取不全 (#5669)
This commit is contained in:
+4
-4
@@ -1766,11 +1766,11 @@ type 列表:
|
||||
|
||||
### 设计与建筑学院
|
||||
|
||||
<Route author="yikZero" example="/zjut/design/5" path="/zjut/design/:type" :paramsDesc="['板块id']">
|
||||
<Route author="yikZero" example="/zjut/design/16" path="/zjut/design/:type" :paramsDesc="['板块id']">
|
||||
|
||||
| 学术科研 | 学院新闻 | 公告通知 | 学术交流 |
|
||||
| -------- | -------- | -------- | -------- |
|
||||
| 5 | 16 | 18 | 20 |
|
||||
| 学院新闻 | 公告通知 | 学术交流 |
|
||||
| -------- | -------- | -------- |
|
||||
| 16 | 18 | 20 |
|
||||
|
||||
</Route>
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user