diff --git a/lib/v2/hitwh/today.js b/lib/v2/hitwh/today.js index 245213c193..c21251c35b 100644 --- a/lib/v2/hitwh/today.js +++ b/lib/v2/hitwh/today.js @@ -6,7 +6,11 @@ const timezone = require('@/utils/timezone'); const baseUrl = 'https://today.hitwh.edu.cn'; module.exports = async (ctx) => { - const response = await got(`${baseUrl}/1024/list.htm`); + const response = await got(`${baseUrl}/1024/list.htm`, { + https: { + rejectUnauthorized: false, + }, + }); const $ = cheerio.load(response.data); const type = (filename) => filename.split('.').pop(); const links = $('.list_list_wrap #wp_news_w10002 ul > li') @@ -25,7 +29,11 @@ module.exports = async (ctx) => { ctx.cache.tryGet(item.link, async () => { if (type(item.link) === 'htm') { try { - const { data } = await got(item.link); + const { data } = await got(item.link, { + https: { + rejectUnauthorized: false, + }, + }); const $ = cheerio.load(data); item.description = $('div.wp_articlecontent').html() && $('div.wp_articlecontent').html().replaceAll('src="/', `src="${baseUrl}/`).replaceAll('href="/', `href="${baseUrl}/`).trim(); return item;