fix(route): beijing/kw handling external links (#9123)
This commit is contained in:
parent
dae6cb757f
commit
0b832b38d2
|
|
@ -19,7 +19,7 @@ module.exports = async (ctx) => {
|
|||
const result = item.match(/urls\[i]='(.*?)';headers\[i]="(.*?)";year\[i]='(\d+)';month\[i]='(\d+)';day\[i]='(\d+)';/);
|
||||
return {
|
||||
title: cheerio.load(result[2])('a').attr('title') || result[2],
|
||||
link: `${rootUrl}${result[1]}`,
|
||||
link: new URL(result[1], rootUrl).href,
|
||||
pubDate: parseDate(`${result[3]}-${result[4]}-${result[5]}`, 'YYYY-MM-DD'),
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue