fix: 重庆大学新闻网通知公告 (#6430)

This commit is contained in:
Hagb (Guo Junyu 郭俊余)
2020-12-14 11:30:20 +00:00
committed by GitHub
parent 4a1d5cdbaa
commit b9fe1c908e
+2 -2
View File
@@ -4,7 +4,7 @@ const cheerio = require('cheerio');
module.exports = async (ctx) => {
// const category = ctx.params.category;
// const baseUrl = 'https://news.cqu.edu.cn/newsv2/';
const baseUrl = 'https://news.cqu.edu.cn/';
const url = 'https://news.cqu.edu.cn/newsv2/list-18.html';
const response = await got({
method: 'get',
@@ -44,7 +44,7 @@ module.exports = async (ctx) => {
}
const response = await got({
method: 'get',
url: link,
url: baseUrl + link,
});
const $ = cheerio.load(response.data);
const newsContent = $('div[class=content]', 'div[class="container detail"]');