fix url concatenation (#6736)

This commit is contained in:
Jinkin
2021-01-20 18:31:15 -05:00
committed by GitHub
parent 35afd7ad2a
commit 12490efed3
+2 -1
View File
@@ -2,6 +2,7 @@ const cheerio = require('cheerio');
module.exports = async (ctx) => {
const baseIndexUrl = 'https://www.sice.uestc.edu.cn/index.htm';
const host = 'https://www.sice.uestc.edu.cn/';
const browser = await require('@/utils/puppeteer')();
const page = await browser.newPage();
@@ -48,7 +49,7 @@ module.exports = async (ctx) => {
}
return {
title: item.find('a[href]').text(),
link: baseIndexUrl + item.find('a[href]').attr('href'),
link: host + item.find('a[href]').attr('href'),
pubDate: date,
};
})