Files
RSSHub/lib/v2/njupt/radar.js
T
Shao yeandTonyRL ee1eab23d8 fix njupt posts with url redirections (#8961)
* fix njupt posts with url redirections

skip posts that are redirected to error pages due to access control

* fix: migrate to v2

* fix: pubDate depreciated url.resolve

Co-authored-by: TonyRL <TonyRL@users.noreply.github.com>
2022-03-13 22:24:06 +08:00

21 lines
677 B
JavaScript

module.exports = {
'njupt.edu.cn': {
_name: '南京邮电大学',
jwc: [
{
title: '教务处通知与新闻',
docs: 'https://docs.rsshub.app/university.html#nan-jing-you-dian-da-xue',
source: '/*/list.htm',
target: (_params, url) => {
url = new URL(url);
if (url.pathname.indexOf('/1594') !== -1) {
return '/njupt/notice';
} else if (url.pathname.indexOf('/1596') !== -1) {
return '/njupt/news';
}
},
},
],
},
};