mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-13 00:20:21 +08:00
* 南京艺术学院研究生院 * Update lib/v2/nua/gra.js Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/v2/nua/gra.js Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/v2/nua/gra.js Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/v2/nua/radar.js Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/v2/nua/radar.js Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/v2/nua/gra.js Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/v2/nua/gra.js Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update docs/university.md Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update docs/university.md Co-authored-by: Tony <TonyRL@users.noreply.github.com> * 优化代码 * 优化 * update * 补充南京艺术学院 * fix * fix * fix * 更新南京艺术学院数据源。 * 更新南京艺术学院数据源。 * fix * fix * update * fix doc * fix * Update lib/v2/nua/radar.js Co-authored-by: Tony <TonyRL@users.noreply.github.com> * fix: yarn.lock permission * style: auto format * fix double fetch same page * Update dc.js * Revert "Merge branch 'master' of https://github.com/evnydd0sf/RSS-Hub" This reverts commitdd56f9469b, reversing changes made tod900050eb8. * fix * Revert "fix" This reverts commit820ff88120. * Revert "Revert "Merge branch 'master' of https://github.com/evnydd0sf/RSS-Hub"" This reverts commitce67e0b53c. * 增加微信公众号解析引导。 * 修正url * 适配微信公众号内容。 * 适配站内文章、微信公号号文章和未知文章引导。 * Update wechat-mp.js * fix fetch wechat bug * 增加设计学院研创、后浪模块 * bugfix * Revert "Merge branch 'DIYgod:master' into master" This reverts commit102cb48db6, reversing changes made toccac4be518. * Update university.md * Revert "Revert "Merge branch 'DIYgod:master' into master"" This reverts commitc8841910b8. * fix fetch listname * fix: switch default case Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
64 lines
2.0 KiB
JavaScript
64 lines
2.0 KiB
JavaScript
const util = require('./utils');
|
|
|
|
module.exports = async (ctx) => {
|
|
const type = ctx.params.type;
|
|
|
|
const baseUrl = 'https://dc.nua.edu.cn';
|
|
|
|
let listName;
|
|
let listDate;
|
|
let artiContent;
|
|
let webPageName;
|
|
|
|
switch (type) {
|
|
case 'news':
|
|
listName = 'li.pre35.left li.news_list';
|
|
listDate = '.date';
|
|
artiContent = '.article';
|
|
webPageName = 'li.pre35.left .big_title';
|
|
break;
|
|
case 'exhibition':
|
|
listName = 'li.pre65.right li.effects';
|
|
listDate = '.date';
|
|
artiContent = '.article';
|
|
webPageName = 'li.pre65.right .big_title';
|
|
break;
|
|
case 'project':
|
|
listName = 'ul.center div.center_list_img';
|
|
listDate = '.date';
|
|
artiContent = '.article';
|
|
webPageName = 'ul.center .big_title';
|
|
break;
|
|
case 'rc':
|
|
listName = 'div.pre65.left p.small_content_2';
|
|
listDate = '.date';
|
|
artiContent = '.article';
|
|
webPageName = 'div.pre65.left.is-inview .big_title';
|
|
break;
|
|
case 'party':
|
|
listName = 'div.pre35.right li.party_list';
|
|
listDate = '.date';
|
|
artiContent = '.article';
|
|
webPageName = 'div.pre35.right .big_title';
|
|
break;
|
|
case 'youth':
|
|
listName = 'ul.works_list p.small_content_2.viewpoint';
|
|
listDate = '.date';
|
|
artiContent = '.article';
|
|
webPageName = 'ul.screen_4 .big_title';
|
|
break;
|
|
default:
|
|
throw Error(`暂不支持对${type}的订阅`);
|
|
}
|
|
|
|
const items = await util.ProcessList(baseUrl, baseUrl, listName, listDate, webPageName);
|
|
const results = await util.ProcessFeed(items[0], artiContent, ctx);
|
|
|
|
ctx.state.data = {
|
|
title: 'NUA-设计学院-' + items[1],
|
|
link: baseUrl,
|
|
description: '南京艺术学院 设计学院 ' + items[1],
|
|
item: results,
|
|
};
|
|
};
|