mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
✨ feat: 增加专栏总结
This commit is contained in:
parent
69150a6a6b
commit
95cb458122
@ -443,6 +443,11 @@ export class tools extends plugin {
|
||||
if (matched) {
|
||||
url = url.replace(matched[0].replace("\/", ""), av2BV(Number(matched[2])));
|
||||
}
|
||||
// 处理专栏
|
||||
if (e.msg !== undefined && e.msg.includes("read\/cv")) {
|
||||
this.linkShareSummary(e);
|
||||
return true;
|
||||
}
|
||||
// 处理下载逻辑
|
||||
if (e.msg !== undefined && e.msg.startsWith("下载")) {
|
||||
// 检测是否扫码了,如果没有扫码数据终止下载
|
||||
|
@ -7,6 +7,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 sspaiReg = /(?:https?:\/\/)?sspai.com\/[a-zA-Z\d._?%&+\-=\/#]*/;
|
||||
const biliReadReg = /(?:https?:\/\/)?www\.bilibili\.com\/read\/[A-Za-z\d._?%&+\-=\/#]*/;
|
||||
if (wxReg.test(link)) {
|
||||
return {
|
||||
name: '微信文章',
|
||||
@ -22,6 +23,11 @@ export function contentEstimator(link) {
|
||||
name: '少数派',
|
||||
summaryLink: sspaiReg.exec(link)?.[0]
|
||||
}
|
||||
} else if (biliReadReg.test(link)) {
|
||||
return {
|
||||
name: '哔哩哔哩专栏',
|
||||
summaryLink: biliReadReg.exec(link)?.[0]
|
||||
}
|
||||
} else {
|
||||
logger.error("[R插件][总结模块] 内容评估出错...");
|
||||
throw Error("内容评估出错...");
|
||||
|
Loading…
x
Reference in New Issue
Block a user