fix url concatenation (#6736)
This commit is contained in:
@@ -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,
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user