mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
✨ feat: 新增ChinaDaily
总结
This commit is contained in:
parent
cd773242f0
commit
1c409cb369
@ -182,7 +182,7 @@ export class tools extends plugin {
|
||||
fnc: "freyr"
|
||||
},
|
||||
{
|
||||
reg: "(mp.weixin|arxiv.org|sspai.com)",
|
||||
reg: "(mp.weixin|arxiv.org|sspai.com|chinadaily.com.cn)",
|
||||
fnc: "linkShareSummary"
|
||||
}
|
||||
],
|
||||
|
@ -6,6 +6,7 @@
|
||||
export function contentEstimator(link) {
|
||||
const wxReg = /(?:https?:\/\/)?mp\.weixin\.qq\.com\/[A-Za-z\d._?%&+\-=\/#]*/;
|
||||
const arxivReg = /(?:https?:\/\/)?arxiv.org\/[a-zA-Z\d._?%&+\-=\/#]*/;
|
||||
const chinaDailyReg = /(?:https?:\/\/)?(www\.)chinadaily.com.cn\/a\/[a-zA-Z0-9\d._?%&+\-=\/#]*/;
|
||||
const sspaiReg = /(?:https?:\/\/)?sspai.com\/[a-zA-Z\d._?%&+\-=\/#]*/;
|
||||
const biliReadReg = /(?:https?:\/\/)?www\.bilibili\.com\/read\/[A-Za-z\d._?%&+\-=\/#]*/;
|
||||
if (wxReg.test(link)) {
|
||||
@ -28,6 +29,11 @@ export function contentEstimator(link) {
|
||||
name: '哔哩哔哩专栏',
|
||||
summaryLink: biliReadReg.exec(link)?.[0]
|
||||
}
|
||||
} else if (chinaDailyReg.test(link)) {
|
||||
return {
|
||||
name: 'ChinaDaily',
|
||||
summaryLink: chinaDailyReg.exec(link)?.[0]
|
||||
}
|
||||
} else {
|
||||
logger.error("[R插件][总结模块] 内容评估出错...");
|
||||
throw Error("内容评估出错...");
|
||||
|
Loading…
x
Reference in New Issue
Block a user