بنقرة واحدة
cnki-exp-search-automation
CNKI(中国知网)高级搜索自动化技能。使用浏览器自动化技术搜索文献并获取结果列表及摘要信息。建议在有头浏览器环境下使用以便于处理反机器人验证。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
CNKI(中国知网)高级搜索自动化技能。使用浏览器自动化技术搜索文献并获取结果列表及摘要信息。建议在有头浏览器环境下使用以便于处理反机器人验证。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Convert files and office documents to Markdown. Supports PDF, DOCX, PPTX, XLSX, images (with OCR), audio (with transcription), HTML, CSV, JSON, XML, ZIP, YouTube URLs, EPubs and more.
Use this skill when users need to search academic papers, download research documents, extract citations, or gather scholarly information. Triggers include: requests to "find papers on", "search research about", "download academic articles", "get citations for", or any request involving academic databases like arXiv, PubMed, Semantic Scholar, or Google Scholar. Also use for literature reviews, bibliography generation, and research discovery. Requires OpenClawCLI installation from clawhub.ai.
Search academic papers and conduct literature reviews using OpenAlex API (free, no key needed). Use when the user needs to find scholarly papers by topic/author/DOI, explore citation chains, get structured paper metadata (title, authors, abstract, citations, DOI, open access URL), fetch full text of open access papers, or conduct automated literature reviews with theme identification and synthesis. Triggers on requests involving academic search, paper lookup, citation analysis, literature review, research synthesis, or scholarly reference gathering.
Use AI4Scholar author tools to search scholars, inspect author profiles, retrieve an author's papers, compare experts, identify potential reviewers, map labs or collaborators, and verify whether an author is the correct person.
Use AI4Scholar auto_cite to add real citations to academic text and return formatted references and BibTeX. Trigger for automatic citation insertion, APA/IEEE/Vancouver/Nature citation support, reference generation, BibTeX export, or checking whether claims have real supporting papers.
Use AI4Scholar to trace citation networks: citing papers, references, PubMed related papers, backward/forward citation search, classic paper discovery, mechanism literature expansion, and reviewer-style citation gap checks.
| name | cnki-exp-search-automation |
| description | CNKI(中国知网)高级搜索自动化技能。使用浏览器自动化技术搜索文献并获取结果列表及摘要信息。建议在有头浏览器环境下使用以便于处理反机器人验证。 |
| author | OpenClaw |
| version | 0.0.3 |
| date | "2026-03-16T00:00:00.000Z" |
| tags | ["cnki","中国知网","文献检索","学术搜索","浏览器自动化","摘要提取"] |
| categories | ["学术研究","数据采集"] |
| requires | [{"browser":"浏览器工具(建议使用有头浏览器以便处理验证)"},{"network":"网络访问 CNKI"}] |
| references | [{"cnki-fields.md":"CNKI专业检索字段一览表"},{"query-examples.md":"CNKI专业检索查询案例"}] |
| notes | - 反机器人验证需要用户自行解决:当出现滑块验证、点选验证或验证码时,需要用户手动完成验证 - 建议在有头浏览器(headful)环境下使用,无头模式可能触发验证 - 请合理控制请求频率,遵守CNKI服务条款 - 本技能通过 OpenClaw 的 browser 工具执行浏览器操作 - 建议设置 profile="user" 使用用户浏览器以便处理验证码 |
| permissions | [{"browser":"控制浏览器访问网页"},{"storage":"读写文件保存数据"}] |
| features | ["CNKI高级搜索/专业检索","批量获取搜索结果列表","文章详情页摘要提取","反机器人验证处理(需用户手动完成)","多页结果翻页提取"] |
| usage | ## 快速开始 ### 示例命令 **搜索文献:** 在CNKI上搜索"结膜松弛的治疗"相关文献 **获取摘要:** 获取某篇CNKI文章的摘要信息 --- |
CNKI(中国知网)高级搜索自动化技能。利用 OpenClaw 浏览器工具自动化执行 CNKI 专业检索,获取文献列表和摘要信息。
核心特点:
Step 1: 打开CNKI搜索页面
使用 browser 工具导航到CNKI搜索页面:
action: navigate
url: https://www.cnki.net/
Step 2: 输入搜索关键词
在搜索框中输入检索语句,如:
'结膜松弛'
使用 fill 操作输入:
kind: fill
ref: 搜索框
text: '结膜松弛'
Step 3: 点击搜索按钮
使用 click 操作:
kind: click
ref: 搜索按钮
Step 4: 等待并提取结果
等待结果加载后,使用 snapshot 或 evaluate 提取数据。
在浏览器控制台执行以下代码提取当前页结果:
// 提取搜索结果表格数据
function extractResults() {
const results = [];
// 尝试查找结果表格
const table = document.querySelector('table.resulttable') ||
document.querySelector('.result-table') ||
document.querySelector('table');
if (!table) {
console.log('未找到结果表格');
return results;
}
const rows = table.querySelectorAll('tr');
rows.forEach(row => {
const cells = row.querySelectorAll('td');
if (cells.length >= 5) {
const titleCell = cells[1];
const titleLink = titleCell?.querySelector('a');
if (titleLink) {
results.push({
title: titleLink.textContent?.trim() || '',
link: titleLink.href || '',
authors: cells[2]?.textContent?.trim() || '',
source: cells[3]?.textContent?.trim() || '',
date: cells[4]?.textContent?.trim() || '',
cites: cells[6]?.textContent?.trim() || '0'
});
}
}
});
return results;
}
extractResults();
提取后数据示例:
[
{
"title": "射频微创治疗结膜松弛引起溢泪的临床观察",
"link": "https://kns.cnki.net/kcms2/article/abstract/xxx",
"authors": "郑璇;杨晓钊;杨华;张懿;王博",
"source": "国际眼科杂志",
"date": "2026-02-25",
"cites": "0"
}
]
翻到下一页(使用键盘更稳定):
kind: press
key: ArrowRight
或点击下一页按钮:
kind: click
ref: 下一页按钮
翻页后等待2-3秒让页面加载:
timeMs: 3000
Step 1: 导航到文章详情页
直接打开文章URL:
action: navigate
url: https://kns.cnki.net/kcms2/article/abstract/xxxxx
Step 2: 等待页面加载
等待主要元素加载完成:
loadState: domcontentloaded
timeMs: 5000
Step 3: 提取文章元数据
在浏览器中执行以下代码:
// 提取文章详情
function extractArticleDetails() {
const details = {};
// 标题
const titleEl = document.querySelector('h1') ||
document.querySelector('.title') ||
document.querySelector('[class*="title"]');
details.title = titleEl?.textContent?.trim() || '';
// 作者列表
const authorLinks = document.querySelectorAll('.author-list a, .author a, a.author, [class*="author"] a');
details.authors = Array.from(authorLinks).map(a => a.textContent?.trim()).filter(Boolean);
// 机构
const orgEl = document.querySelector('[class*="org"]') ||
document.querySelector('.institution') ||
document.querySelector('[class*="institution"]');
details.institution = orgEl?.textContent?.trim() || '';
// 期刊
const journalEl = document.querySelector('.journal-name') ||
document.querySelector('.source') ||
document.querySelector('[class*="journal"], [class*="source"]');
details.journal = journalEl?.textContent?.trim() || '';
// 发表日期
const dateEl = document.querySelector('.publish-date') ||
document.querySelector('.date') ||
document.querySelector('[class*="date"]');
details.publishDate = dateEl?.textContent?.trim() || '';
// 摘要
const abstractEl = document.querySelector('.abstract') ||
document.querySelector('.summary') ||
document.querySelector('[class*="abstract"]');
details.abstract = abstractEl?.textContent?.trim() || '';
// 关键词
const keywordLinks = document.querySelectorAll('.keywords a, .keyword a, [class*="keyword"] a');
details.keywords = Array.from(keywordLinks).map(k => k.textContent?.trim()).filter(Boolean);
// DOI
const doiEl = document.querySelector('.doi') || document.querySelector('[class*="doi"]');
details.doi = doiEl?.textContent?.trim() || '';
// 页码
const pagesEl = document.querySelector('.pages');
details.pages = pagesEl?.textContent?.trim() || '';
// 卷期
const volumeEl = document.querySelector('.volume');
details.volume = volumeEl?.textContent?.trim() || '';
// 引用次数
const citeEl = document.querySelector('.cited') || document.querySelector('[class*="cite"]');
details.cites = citeEl?.textContent?.trim() || '0';
return details;
}
extractArticleDetails();
提取后数据示例:
{
"title": "新月形结膜切除联合结膜巩膜固定术治疗结膜松弛症",
"authors": ["武耀红", "何敏"],
"institution": "山西医科大学第二医院",
"journal": "临床医药实践",
"publishDate": "2006-04-25",
"abstract": "目的: 探讨新月形结膜切除联合结膜巩膜固定术治疗结膜松弛症的疗效...",
"keywords": ["结膜松弛症", "新月形切除", "巩膜固定术"],
"doi": "",
"pages": "293-294",
"volume": "2006(04)",
"cites": 0
}
Step 4: 返回前一页,继续下一个论文数据提取
| 检索内容 | 查询语句 |
|---|---|
| 结膜松弛主题 | SU='结膜松弛' |
| 结膜松弛治疗 | SU='结膜松弛' and SU='治疗' |
| 结膜松弛或手术 | SU='结膜松弛' or SU='手术' |
| 检索内容 | 查询语句 |
|---|---|
| 特定作者 | AU='张兴儒' and SU='结膜松弛' |
| 特定单位 | AF='复旦大学' and SU='结膜松弛' |
| 篇名检索 | TI='结膜松弛症' |
| 全文检索 | FT='手术方法' |
| 高被引文献 | SU='结膜松弛' and CF>10 |
| 特定期刊 | LY='中华眼科杂志' and SU='结膜松弛' |
| 检索内容 | 查询语句 |
|---|---|
| 眼科分类 | SU='结膜松弛' and CLC=R779.6 |
| 基金资助 | FU='国家自然科学基金' and SU='结膜松弛' |
| 中英文扩展 | SU='结膜松弛' or SU='conjunctivochalasis' |
CNKI 可能会出现验证,需要用户手动处理:
有头浏览器模式(推荐):
使用 profile="user" 让用户可以在浏览器中手动完成验证:
profile: user
action: navigate
url: https://kns.cnki.net/kns8s/AdvSearch?type=expert
出现验证时,告诉用户:
"检测到CNKI验证,请手动完成验证后继续"
用户完成验证后,继续执行后续操作。
将提取的数据保存为JSON文件:
# 提取的数据格式
[
{
"title": "文献标题",
"link": "https://...",
"authors": "作者列表",
"source": "期刊来源",
"date": "发表日期",
"cites": "引用数"
}
]
使用 write 工具保存:
file_path: cnki_results.json
content: <提取的JSON数据>
转换为CSV格式:
title,authors,source,date,cites
文献标题,作者,期刊,日期,引用数
...
1. 打开高级搜索页面
action: navigate
url: https://kns.cnki.net/kns8s/AdvSearch?type=expert
2. 等待页面加载
loadState: networkidle
timeMs: 10000
3. 输入搜索词
kind: fill
ref: 搜索框
text: SU='结膜松弛' and SU='治疗'
4. 点击搜索
kind: click
ref: 搜索按钮
5. 等待结果并提取
loadState: networkidle
timeMs: 8000
6. 翻页提取多页结果
循环执行:提取当前页 → 翻页 → 等待 → 提取
7. 保存结果
将提取的数据保存到文件。
| 错误情况 | 解决方法 |
|---|---|
| 页面加载超时 | 增加等待时间或刷新重试 |
| 找不到元素 | 使用备选选择器 |
| 验证码出现 | 等待用户手动完成 |
| 数据提取为空 | 检查页面结构是否变化 |
references/cnki-fields.md - CNKI专业检索字段一览表references/query-examples.md - CNKI专业检索查询案例高级搜索页面提供两种时间范围筛选方式。
点击日期输入框会弹出日历选择器,可选择具体日期:
# 点击第一个日期输入框(开始日期)
kind: click
ref: e124 # 发表时间开始日期输入框
# 在弹出的日历中选择日期
# 日历显示当月所有天数,点击具体日期即可选中
# 点击第二个日期输入框(结束日期)
kind: click
ref: e125 # 发表时间结束日期输入框
# 在弹出的日历中选择结束日期
元素参考:
ref=e124ref=e1252026-03-01 -- 2026-03-31日历选择器操作:
点击下拉菜单可选择预设的时间范围:
# 点击更新时间下拉菜单
kind: click
ref: e129 # 更新时间下拉菜单
元素参考:
ref=e129ref=e130 (默认显示"不限")ref=e131 (显示"∨")ref=e641ref=e642ref=e644ref=e646ref=e648ref=e650ref=e652ref=e654可选时间范围: