feat: add rule for yuque (#4802)

This commit is contained in:
xcodebuild
2020-05-19 00:21:55 +08:00
committed by GitHub
parent a94db47755
commit 3e6f5bfa75
+23
View File
@@ -1909,6 +1909,29 @@
},
],
},
'yuque.com': {
_name: '语雀',
www: [
{
title: '知识库',
docs: 'https://docs.rsshub.app/study.html#yu-que',
source: ['/:space/:book'],
target: (params, url, document) => {
const match = document.documentElement.innerHTML.match(/JSON\.parse\(decodeURIComponent\("(.*)"\)/);
if (match && match[1]) {
const dataStr = match[1];
try {
const appData = JSON.parse(decodeURIComponent(dataStr));
return `/yuque/doc/${appData.book.id}`;
} catch (e) {
// pass
}
}
},
}
],
},
'bjeea.com': {
_name: '北京考试院',
www: [