cjournal-analyzer
C刊论文全面分析工具
Phase 1: 确定期刊与CNKI代码
- 从用户输入中提取期刊名称
- 查询
references/journal_codes.md获取CNKI代码(如"管理世界"→GLSJ) - 若未收录,用WebSearch搜索
site:navi.cnki.net/knavi/journals "{期刊名}"从URL提取代码 - 向用户确认期刊后继续
Phase 2: 浏览器数据采集
使用Chrome DevTools MCP工具从知网采集数据。
Step 2.1: 打开期刊页
navigate_page → https://navi.cnki.net/knavi/journals/{CODE}/detail
验证码处理:若页面出现"请完成安全验证"或"拖动下方拼图",立即提示用户:
"知网需要安全验证,请在浏览器中完成滑块验证,完成后告诉我。"
等用户确认后,用 navigate_page 重新加载页面。
Step 2.2: 提取期刊基本信息
() => {
const title = document.querySelector('h3')?.textContent?.trim() || '';
const info = {};
document.querySelectorAll('.detailInfo p, .s-info p').forEach(p => {
const text = p.textContent;
if (text.includes('主办单位')) info.sponsor = text.split(':')[1]?.trim();
if (text.includes('ISSN')) info.issn = text.split(':')[1]?.trim();
if (text.includes('CN')) info.cn = text.split(':')[1]?.trim();
if (text.includes('出版周期')) info.frequency = text.split(':')[1]?.trim();
if (text.includes('复合影响因子')) info.cif = text.split(':')[1]?.trim();
if (text.includes('综合影响因子')) info.aif = text.split(':')[1]?.trim();
});
return { title, ...info };
}
也可直接从snapshot中读取基本信息(StaticText节点)。
Step 2.3: 点击"论文"标签并提取年份期次
点击 uid 对应"论文"的链接,等待加载,然后提取:
() => {
const results = [];
document.querySelectorAll('dl[id$="_Year_Issue"]').forEach(dl => {
const year = dl.querySelector('dt em')?.textContent?.trim();
if (!year) return;
const issues = [];
dl.querySelectorAll('dd a').forEach(a => {
issues.push({ id: a.id, issue: a.textContent.trim(), value: a.getAttribute('value') });
});
results.push({ year: parseInt(year), issues });
});
return results;
}
筛选最近5年数据(当前年份 - 4 至当前年份)。若知网分页显示年份(每页显示部分年份),需翻页加载更多。
Step 2.4: 逐期采集文章列表
对每个期次,点击对应的期次链接(通过 click uid 或 evaluate_script 模拟点击),等待文章列表加载(wait_for 等待标题出现或等1-2秒),然后提取:
() => {
const articles = [];
document.querySelectorAll('#CatalogList dd.row').forEach(dd => {
const titleEl = dd.querySelector('span.name a');
const authorEl = dd.querySelector('span.author');
const pageEl = dd.querySelector('span.company');
const sectionEl = dd.closest('div')?.querySelector('dt.tit');
if (titleEl) {
articles.push({
title: titleEl.textContent.trim(),
url: titleEl.href,
authors: authorEl?.getAttribute('title')?.replace(/;$/,'') || '',
pages: pageEl?.getAttribute('title') || '',
section: sectionEl?.textContent?.trim() || ''
});
}
});
return articles;
}
关键:
- 每个期次采集间隔1-2秒,避免触发反爬
- 持续向用户报告进度(如"正在采集2024年第6期,已完成32/60期...")
- 所有数据暂存到一个JSON数组中
Step 2.5: 摘要采集(抽样策略)
全量摘要采集耗时极长,采用抽样:每年选取2期(如第1期和第7期),每期取前3篇文章访问摘要页。
访问文章详情页后提取摘要:
() => {
const abs = document.querySelector('#ChDivSummary, .abstract-text, [name="abstracts"]');
const kw = document.querySelector('#ChDivKeyWord, .keywords');
return {
abstract: abs?.textContent?.trim() || '',
keywords: kw?.textContent?.replace('关键词:','').trim() || ''
};
}
若浏览器方式受阻,用WebSearch搜索 "{文章标题}" site:cnki.net 补充摘要和关键词。
Phase 3: 数据分析
采集完成后,将所有数据保存为JSON,然后运行 scripts/analyze_journal.py 进行分析。
该脚本依赖:pip3 install jieba wordcloud python-docx matplotlib numpy
脚本接收JSON数据文件路径,输出分析结果和可视化图表:
- 发文量趋势:按年度统计发文数量折线图
- 高频关键词Top30:jieba分词 → 去停用词 → 词频统计 → 柱状图+词云
- 主题聚类:基于高频词共现进行粗粒度主题归类
- 栏目分析:各栏目发文占比饼图及趋势变化
- 核心作者Top20:发文频次柱状图
- 研究方法识别:从标题中匹配方法关键词(实证/案例/实验/模型/仿真/调查/访谈/文献计量/元分析/回归/面板数据/DID/RDD/PSM/机器学习/深度学习/SEM/扎根理论等)
- 热点演变:前3年 vs 近2年的关键词对比,识别新兴/衰退主题
- 研究空白与投稿建议:基于以上分析综合给出
Phase 4: 生成Word报告
使用python-docx生成格式化报告,结构:
封面:《{期刊名}》近五年({起始年}-{结束年})发文分析报告
一、期刊概况
二、发文量与趋势分析(含图表)
三、选题热点分析(含词云图、高频词柱状图)
四、热点演变与新兴主题
五、核心作者群分析
六、研究方法偏好分析
七、栏目主题分析
八、研究空白与投稿建议
附录:完整文章目录(按年份-期次排列)
报告保存至 ~/Downloads/{期刊名}_近五年发文分析报告.docx。
注意事项
- 知网有反爬机制,每次请求间隔≥1秒
- 验证码出现时必须请用户手动完成
- 安装依赖:
pip3 install jieba wordcloud python-docx matplotlib numpy - 期刊代码优先查
references/journal_codes.md - 采集全程保持进度播报
More from yipng05-max/-skills
literature-verifier
Verify the authenticity of literature references and detect hallucinations in both English and Chinese (中文) sources. Use when users need to check if a citation is real, verify a DOI, confirm a paper/article/book exists, cross-check author-title-journal-year metadata, detect fabricated references, validate URLs of online articles, or audit a reference list for accuracy. Covers journal papers, conference papers, preprints, books, monographs, newspaper articles, magazine articles, web articles, dissertations, government documents, and any other published works. Supports Chinese academic databases including CNKI (知网), Wanfang (万方), CQVIP (维普), Baidu Scholar (百度学术), and core journal list verification (北大核心, CSSCI, CSCD).
11cnki-advanced-search
>
11literature-review-writer
>
9feishu-paper-reviewer
飞书文档论文审阅工具。直接在飞书云文档上进行学术论文审阅,支持高亮、删除线、加粗变色、划词批注、插入审阅意见等多种修订标记。当用户提到对飞书文档/云文档进行论文审阅、审稿、评阅、修改批注,或提供飞书文档链接要求审阅时触发。关键词:飞书论文审阅、飞书审稿、云文档评阅、飞书批注论文。
9paper-analyzer
学术论文结构化阅读、拆解与分析工具。基于12个阅读要素(研究背景、研究问题、研究结论、文献综合、文献批评、研究方法、理论视角与理论框架、一致性发现、不一致性发现、研究贡献、研究不足、未来研究展望)对论文进行深度拆解,结果保存为Excel文件。当用户提到需要针对论文/文献/paper进行拆解、解析、分析、阅读、梳理,并上传或告知一篇或多篇论文的本地文件路径(PDF、Word等)时触发此skill。
8introduction-writer
|
7