@@ -5,19 +5,17 @@ import { load } from 'cheerio';
5
5
import { parseDate } from '@/utils/parse-date' ;
6
6
import timezone from '@/utils/timezone' ;
7
7
8
- const rootUrl = 'https://news.hrbust.edu.cn/' ;
9
-
10
8
export const route : Route = {
11
9
path : '/news/:category?' ,
12
10
name : '新闻网' ,
13
11
url : 'news.hrbust.edu.cn' ,
14
12
maintainers : [ 'cscnk52' ] ,
15
13
handler,
16
14
example : '/hrbust/news' ,
17
- parameters : { category : '栏目标识,默认为理工要闻 ' } ,
18
- description : `| 理工要闻 | 新闻导读 | 综合新闻 | 教学科研 | 院处动态 | 学术科创 | 交流合作 | 招生就业 | 党建思政 | 在线播放 | 理工校报 | 媒体理工 | 讲座论坛 |
19
- |------|------|--------|------|------|------|------|------|------|------|------|------| ------|
20
- | lgyw | xwdd | zhenew | jxky | ycdt | xskc | jlhz | zsjy | djsz | zxbf | lgxb | mtlg | jzlt |` ,
15
+ parameters : { category : '栏目标识,默认为 lgyw(理工要闻) ' } ,
16
+ description : `| 理工要闻 | 新闻导读 | 综合新闻 | 教学科研 | 院处动态 | 学术科创 | 交流合作 | 招生就业 | 党建思政 | 在线播放 | 理工校报 | 媒体理工 | 讲座论坛 | 人才招聘 |
17
+ |---------- |---------- |---------- |---------- |---------- |---------- |---------- |---------- |---------- |---------- |---------- |----------|----------|---- ------|
18
+ | lgyw | xwdd | zhenew | jxky | ycdt | xskc | jlhz | zsjy | djsz | zxbf | lgxb | mtlg | jzlt | rczp |` ,
21
19
categories : [ 'university' ] ,
22
20
features : {
23
21
supportRadar : true ,
@@ -36,6 +34,8 @@ export const route: Route = {
36
34
} ;
37
35
38
36
async function handler ( ctx ) {
37
+ const rootUrl = 'https://news.hrbust.edu.cn/' ;
38
+
39
39
const { category = 'lgyw' } = ctx . req . param ( ) ;
40
40
41
41
const response = await got ( `${ rootUrl } ${ category } .htm` ) ;
@@ -62,7 +62,7 @@ async function handler(ctx) {
62
62
list . map ( ( item ) =>
63
63
cache . tryGet ( item . link , async ( ) => {
64
64
if ( ! item . link . startsWith ( rootUrl ) ) {
65
- item . description = '本文需跳转,请点击标题后阅读 ' ;
65
+ item . description = '本文需跳转,请点击原文链接后阅读 ' ;
66
66
return item ;
67
67
}
68
68
0 commit comments