-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
一个小tips,下载制定的知识库 #16
Comments
可以给一个详细的步骤吗? |
关键code for (const object of bookData) {
|
根据知识库名称下载特定知识库的步骤获取知识库的数据结构
重点关注的字段
关键代码修改修改文件的路径
具体代码修改因为我的知识库全部改成了英文名称,因此,我使用知识库名称过滤。
效果当执行 node main.js之后,就只下载特定的知识库。 |
因为我的知识库文档内容太多,整体下载会卡死或超时。
可以在 getAllBooks 函数中,拿到 bookData 数据后,进行判断,只下载需要的 books 知识库。
code:if (object.books[i].id ===id) {
通过 https://www.yuque.com/api/mine/book_stacks 接口获取 全部 bookData内容,得到book_id。
通过 https://www.yuque.com/api/catalog_nodes?book_id=xxx + id 可以得到当前知识库的全部文章列表 getBookDetail 内容。
The text was updated successfully, but these errors were encountered: