diff --git a/lib/routes/universities/hnust/art/index.js b/lib/routes/universities/hnust/art/index.js index 8abbda896..5314b4262 100644 --- a/lib/routes/universities/hnust/art/index.js +++ b/lib/routes/universities/hnust/art/index.js @@ -4,7 +4,12 @@ const cheerio = require('cheerio'); module.exports = async (ctx) => { const base = 'https://art.hnust.edu.cn/ggtz/'; const link = base + 'index.htm'; - const response = await got.get(link); + const response = await got.get({ + url: link, + https: { + rejectUnauthorized: false, + }, + }); const $ = cheerio.load(response.data); const list = $('.newsList03 li'); diff --git a/lib/routes/universities/hnust/jwc/index.js b/lib/routes/universities/hnust/jwc/index.js index c179f5c0a..ed36ade6e 100644 --- a/lib/routes/universities/hnust/jwc/index.js +++ b/lib/routes/universities/hnust/jwc/index.js @@ -2,12 +2,16 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); module.exports = async (ctx) => { - const base = 'http://jwc.hnust.edu.cn/gzzd2_20170827120536008171/jwk3_20170827120536008171/'; + const base = 'https://jwc.hnust.edu.cn/gzzd2_20170827120536008171/jwk3_20170827120536008171/'; const link = base + 'index.htm'; - const response = await got.get(link); + const response = await got.get({ + url: link, + https: { + rejectUnauthorized: false, + }, + }); const $ = cheerio.load(response.data); const list = $('.articleList ul li'); - ctx.state.data = { title: '湖南科技大学教务处通知', link: link,