hash,date,author,commit_message,is_merge,masked_commit_message,type,git_diff
c0fd832ddee1557c74cd3f49dd8e645591297954,2023-10-06 04:29:54,Chunssu,feat(route): add scau/yjsy (#13455),False,add scau/yjsy (#13455),feat,"diff --git a/lib/v2/scau/maintainer.js b/lib/v2/scau/maintainer.js
index 69798711be8e6e..29d91e0f7f9627 100644
--- a/lib/v2/scau/maintainer.js
+++ b/lib/v2/scau/maintainer.js
@@ -1,3 +1,4 @@
module.exports = {
'/yzb': ['shengmaosu'],
+ '/yjsy': ['Chunssu'],
};
diff --git a/lib/v2/scau/radar.js b/lib/v2/scau/radar.js
index 8f63d388cb44c7..45aab7c7b1130b 100644
--- a/lib/v2/scau/radar.js
+++ b/lib/v2/scau/radar.js
@@ -9,5 +9,13 @@ module.exports = {
target: '/scau/yzb',
},
],
+ yjsy: [
+ {
+ title: '研究生院通知',
+ docs: 'https://docs.rsshub.app/routes/university#hua-nan-nong-ye-da-xue',
+ source: ['/208/list.htm', '/'],
+ target: '/scau/yjsy',
+ },
+ ],
},
};
diff --git a/lib/v2/scau/router.js b/lib/v2/scau/router.js
index a282d01e1c8827..c3908d9de70082 100644
--- a/lib/v2/scau/router.js
+++ b/lib/v2/scau/router.js
@@ -1,3 +1,4 @@
module.exports = (router) => {
router.get('/yzb', require('./yjs'));
+ router.get('/yjsy', require('./yjsy'));
};
diff --git a/lib/v2/scau/yjs.js b/lib/v2/scau/yjs.js
index 8f33faf4b92997..343cd4b09a47a4 100644
--- a/lib/v2/scau/yjs.js
+++ b/lib/v2/scau/yjs.js
@@ -9,9 +9,9 @@ module.exports = async (ctx) => {
const list = $('#wp_news_w25 tr');
ctx.state.data = {
- title: '华南农业大学研究生院',
+ title: '华南农业大学研招办',
link,
- description: '华南农业大学研究生院通知公告',
+ description: '华农研讯',
item:
list &&
list.toArray().map((item) => {
diff --git a/lib/v2/scau/yjsy.js b/lib/v2/scau/yjsy.js
new file mode 100644
index 00000000000000..1e0259a2e952d3
--- /dev/null
+++ b/lib/v2/scau/yjsy.js
@@ -0,0 +1,27 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const { parseDate } = require('@/utils/parse-date');
+
+module.exports = async (ctx) => {
+ const link = 'https://yjsy.scau.edu.cn/208/list1.htm';
+ const response = await got(link);
+ const $ = cheerio.load(response.data);
+ const list = $('#wp_news_w25 tr td tr');
+
+ ctx.state.data = {
+ title: '华南农业大学研究生院',
+ link,
+ description: '通知公告',
+ item:
+ list &&
+ list.toArray().map((item) => {
+ item = $(item);
+ const a = item.find('a').last();
+ return {
+ title: a.text(),
+ link: a.attr('href'),
+ pubDate: parseDate(item.find('td').eq(2).text(), 'YYYY/MM/DD'),
+ };
+ }),
+ };
+};
diff --git a/website/docs/routes/university.md b/website/docs/routes/university.md
index 4ce688c27e53d7..c5c1194712947e 100644
--- a/website/docs/routes/university.md
+++ b/website/docs/routes/university.md
@@ -1833,6 +1833,10 @@ jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE_TLS
+### 研究生院通知 {#hua-nan-nong-ye-da-xue-yan-jiu-sheng-yuan-tong-zhi}
+
+
+
## 华南师范大学 {#hua-nan-shi-fan-da-xue}
### 软件学院通知公告 {#hua-nan-shi-fan-da-xue-ruan-jian-xue-yuan-tong-zhi-gong-gao}"
d8041cc1824c0534a1a56299aeec722dbc9b3987,2024-08-21 20:22:26,github-actions[bot],style: auto format,False,auto format,style,"diff --git a/package.json b/package.json
index b178966dc3b698..da5382d0d18971 100644
--- a/package.json
+++ b/package.json
@@ -197,4 +197,4 @@
""engines"": {
""node"": "">=22""
}
-}
\ No newline at end of file
+}"
4570002ebe0a3485235035ac1c5a64ca98f90723,2020-03-12 22:04:00,Chenyang Shi,fix: 吹牛部落 (#4230),False,吹牛部落 (#4230),fix,"diff --git a/lib/routes/chuiniu/column.js b/lib/routes/chuiniu/column.js
index 34c503d26311e3..27b84a0d997441 100644
--- a/lib/routes/chuiniu/column.js
+++ b/lib/routes/chuiniu/column.js
@@ -7,7 +7,7 @@ module.exports = async (ctx) => {
let response = await got({
method: 'get',
- url: 'http://api.duanshu.com/fairy/api/v1/shop/identifier/',
+ url: 'http://oss-web.duanshu.com/shop/chuiniu-duanshu-com/config.json',
headers: {
Origin: url,
Referer: url,
@@ -20,6 +20,7 @@ module.exports = async (ctx) => {
url: `http://api.duanshu.com/h5/content/free/column/detail/${column_id}?shop_id=${shop_id}`,
headers: {
Referer: url,
+ 'x-platform': 'h5',
},
});
const title = response.data.response.data.title;"
49827f24f157aa4cf05fceb29d665f541ef7f0b0,2022-01-23 01:45:57,GitHub Action,style: auto format,False,auto format,style,"diff --git a/docs/en/programming.md b/docs/en/programming.md
index f4ec3e3b5bb62c..c33970da1c6b51 100644
--- a/docs/en/programming.md
+++ b/docs/en/programming.md
@@ -17,12 +17,6 @@ pageClass: routes
-## Codeforces
-
-### Latest contests
-
-
-
## AtCoder
### Present Contests
@@ -67,6 +61,12 @@ Category
+## Codeforces
+
+### Latest contests
+
+
+
## cve.mitre.org
### Search Result
diff --git a/docs/programming.md b/docs/programming.md
index 410e629fa0b57c..fee085f240df43 100644
--- a/docs/programming.md
+++ b/docs/programming.md
@@ -30,12 +30,6 @@ pageClass: routes
> AlgoCasts 需要付费订阅,RSS 仅做更新提醒,不含付费内容.
-## Codeforces
-
-#### 最新比赛
-
-
-
## AtCoder
### Present Contests
@@ -80,6 +74,12 @@ Rated 对象
+## Codeforces
+
+#### 最新比赛
+
+
+
## cve.mitre.org
### 搜索结果"
3a2ca7e21669797dca5bee89a6b8c019e93fbbd9,2025-02-02 20:45:08,Ethan Shen,fix(gcores): correct rendering of entities and optimize parsing logic (#18257),False,correct rendering of entities and optimize parsing logic (#18257),fix,"diff --git a/lib/routes/gcores/parser.ts b/lib/routes/gcores/parser.ts
index c307154621cccf..815ba9bb02de58 100644
--- a/lib/routes/gcores/parser.ts
+++ b/lib/routes/gcores/parser.ts
@@ -3,14 +3,14 @@ import { getCurrentPath } from '@/utils/helpers';
import path from 'node:path';
-export const __dirname = getCurrentPath(import.meta.url);
+const __dirname = getCurrentPath(import.meta.url);
interface Style {
[key: string]: string;
}
interface BlockType {
- element: string;
+ element: string | undefined;
parentElement?: string;
aliasedElements?: string[];
}
@@ -68,59 +68,31 @@ const BLOCK_TYPES: Readonly> = {
'unordered-list-item': { element: 'li', parentElement: 'ul' },
'ordered-list-item': { element: 'li', parentElement: 'ol' },
blockquote: { element: 'blockquote' },
- atomic: { element: 'figure' },
+ atomic: { element: undefined },
'code-block': { element: 'pre' },
- unstyled: { element: 'div', aliasedElements: ['p'] },
+ unstyled: { element: 'p' },
};
/**
* Creates a styled HTML fragment for a given text and style object.
- * @param text The text content of the fragment.
- * @param style An object containing CSS styles (key-value pairs).
- * @returns An HTML string representing the styled fragment.
+ * @param text - The text content.
+ * @param style - CSS styles as key-value pairs.
+ * @returns HTML string with applied styles.
*/
-const createStyledFragment = (text: string, style: Record): string =>
- ` `${key}: ${value};`)
- .join('')}"">${text}`;
-
-/**
- * Applies inline styles to a text string.
- * @param text The text to style.
- * @param inlineStyleRanges An array of inline style ranges.
- * @returns The styled text.
- */
-const applyStyles = (text: string, inlineStyleRanges: readonly InlineStyleRange[]): string => {
- if (!inlineStyleRanges || inlineStyleRanges.length === 0) {
- return text;
- }
-
- const sortedRanges = [...inlineStyleRanges].sort((a, b) => a.offset - b.offset);
-
- let lastOffset = 0;
- const styledFragments = sortedRanges.map((range) => {
- const style = STYLES[range.style];
- if (!style) {
- return text.substring(lastOffset, range.offset);
- }
-
- const styledText = createStyledFragment(text.substring(range.offset, range.offset + range.length), style);
- const preText = text.substring(lastOffset, range.offset);
- lastOffset = range.offset + range.length;
- return preText + styledText;
- });
- let result = styledFragments.join('');
- result += text.substring(lastOffset);
- return result;
+const createStyledFragment = (text: string, style: Readonly