fix: 湖南科技大学 HTTPS (#6740)

* add 湖南科技大学化学化工学院通知

* fix: 湖南科技大学 HTTPS
This commit is contained in:
OrbitZore
2021-01-21 14:47:42 -05:00
committed by GitHub
parent 1a463e09c9
commit 4153b47136
2 changed files with 13 additions and 4 deletions
+6 -1
View File
@@ -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');
+7 -3
View File
@@ -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,