mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-13 00:35:19 +08:00
* 南京艺术学院研究生院 * Update lib/v2/nua/gra.js * Update lib/v2/nua/gra.js * Update lib/v2/nua/gra.js * Update lib/v2/nua/radar.js * Update lib/v2/nua/radar.js * Update lib/v2/nua/gra.js * Update lib/v2/nua/gra.js * Update docs/university.md * Update docs/university.md * 优化代码 * 优化 * update * 补充南京艺术学院 * fix * fix * fix * 更新南京艺术学院数据源。 * 更新南京艺术学院数据源。 * fix * fix * update * fix doc * fix * Update lib/v2/nua/radar.js * 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 * Update lib/v2/uisdc/utils.js * Update lib/v2/uisdc/utils.js * Update docs/design.md * 更新 hunter 细节猎手内容提取 * 精简代码 * 增加南京艺术学院图书馆的信息 * update * update doc * update * Revert "update" This reverts commit87289de180. * fix doc * fix docs * docs: remove extra tag * refactor: do not ignore eslint Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
40 lines
1.2 KiB
JavaScript
40 lines
1.2 KiB
JavaScript
const util = require('./utils');
|
|
const baseUrl = 'https://lib.nua.edu.cn';
|
|
|
|
module.exports = async (ctx) => {
|
|
const type = ctx.params.type;
|
|
let webPageName;
|
|
|
|
switch (type) {
|
|
case 'xwdt':
|
|
webPageName = '.wp_column.column-1.selected';
|
|
break;
|
|
case 'djdt':
|
|
webPageName = '.wp_column.column-2.selected';
|
|
break;
|
|
case 'zydt':
|
|
webPageName = '.wp_column.column-3.selected';
|
|
break;
|
|
case 'fwdt':
|
|
webPageName = '.wp_column.column-4.selected';
|
|
break;
|
|
default:
|
|
throw Error(`暂不支持对${type}的订阅`);
|
|
}
|
|
|
|
const newsUrl = `${baseUrl}/${type}/list.htm`;
|
|
const listName = 'div.news_con';
|
|
const artiContent = '.wp_articlecontent';
|
|
const listDate = '.news_date';
|
|
|
|
const items = await util.ProcessList(newsUrl, baseUrl, listName, listDate, webPageName);
|
|
const results = await util.ProcessFeed(items[0], artiContent, ctx);
|
|
|
|
ctx.state.data = {
|
|
title: 'NUA-图书馆-' + items[1],
|
|
link: `${baseUrl}/${type}/list.htm`,
|
|
description: '南京艺术学院 图书馆 ' + items[1],
|
|
item: results,
|
|
};
|
|
};
|