Files
RSSHub/lib/v2/nua/dc.js
T
evnydd0sfandgithub-actions[bot] 8495a355f1 feat: 南京艺术学院官网,双馨网,设计学院部分信息 (#10664)
* 南京艺术学院研究生院

* 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 commit dd56f9469b5b2462d482c202ae798b3f159f243e, reversing
changes made to d900050eb8271d0f566070eb58c2c9d87ccd6e53.

* fix

* Revert "fix"

This reverts commit 820ff88120d4fb4fc2bdcd8ee52229d1bfb83c17.

* Revert "Revert "Merge branch 'master' of https://github.com/evnydd0sf/RSS-Hub""

This reverts commit ce67e0b53c231a8a8527b7407211aff1ab7e50d4.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-09-01 00:35:42 +08:00

54 lines
1.6 KiB
JavaScript

// const got = require('@/utils/got');
// const cheerio = require('cheerio');
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 'teach':
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 'party':
listName = 'div.pre35.right li.party_list';
listDate = '.date';
artiContent = '.article';
webPageName = 'div.pre35.right .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.cache);
ctx.state.data = {
title: 'NUA-设计学院-' + items[1],
link: baseUrl,
description: '南京艺术学院 设计学院 ' + items[1],
item: results,
};
};