| name | cnki-paper-detail |
| description | Extract full paper details from a CNKI paper page including title, authors, affiliations, abstract, keywords, fund, classification. Use when the user needs detailed information about a specific paper. |
| argument-hint | [paper URL or blank if already on detail page] |
CNKI Paper Detail Extraction
RC browser tool: navigate with browser action=open url="..."; run the JS in each step via browser action=act kind=evaluate fn="<the async function shown>" (the whole function body goes into fn). Never pass a profile — RC uses its default managed Chrome (CDP 18800).
Extract complete metadata from a CNKI paper detail page.
Arguments
$ARGUMENTS is optionally a CNKI paper detail URL (containing kcms2/article/abstract). If not provided, assumes the current page is already a paper detail page.
Steps
1. Navigate to the paper page (if URL provided)
If $ARGUMENTS contains a URL:
- Use
browser action=open with the URL.
- Use
browser action=act kind=wait with text ["摘要"] and timeout 15000.
2. Check for captcha
Use browser action=snapshot mode=efficient. If "拖动下方拼图完成验证" found, notify user:
CNKI 正在显示滑块验证码。请在 Chrome 浏览器中手动完成拼图验证,完成后告诉我继续。
3. Extract paper metadata via JavaScript
Use browser action=act kind=evaluate with this function:
() => {
const brief = document.querySelector('.brief');
if (!brief) return { error: 'Paper detail section (.brief) not found' };
const title = brief.querySelector('h1')?.innerText?.trim()
?.replace(/\s*附视频\s*$/, '')
?.replace(/\s*网络首发\s*$/, '');
const authorH3s = brief.querySelectorAll('h3.author');
const authorSection = authorH3s[0];
const authors = [];
if (authorSection) {
const authorLinks = authorSection.querySelectorAll('a');
authorLinks.forEach(a => {
const supEl = a.querySelector('sup');
const affiliationNum = supEl ? supEl.innerText.() : ;
textNode = .(a.).( n. === && n..());
name = textNode ? textNode..() : a..();
(!textNode && affiliationNum && name.(affiliationNum)) {
name = name.(, name. - affiliationNum.).();
}
(name) authors.({ name, affiliationNum });
});
}
affiliations = [];
(authorH3s. > ) {
orgLinks = authorH3s[].();
orgLinks.( {
affiliations.(a.?.());
});
}
abstractEl = .();
abstract = abstractEl?.?.() || ;
keywordsP = .();
keywords = keywordsP
? .(keywordsP.()).( a.?.(, ).())
: [];
fundsP = .();
fund = fundsP?.?.() || ;
clcCode = .();
classification = clcCode?.?.() || ;
docTop = .();
journal = docTop?.()?.?.() || ;
headTime = .();
pubInfo = headTime?.?.() || ;
isOnlineFirst = !!brief.();
catalogList = .();
toc = catalogList?.?.() || ;
citationTabs = .();
citationInfo = {};
citationTabs.( {
id = li.();
text = li.?.();
countMatch = text.();
(id) {
citationInfo[id] = {
: text.(, ).(),
: countMatch ? (countMatch[]) :
};
}
});
{
title,
authors,
affiliations,
abstract,
keywords,
fund,
classification,
journal,
pubInfo,
isOnlineFirst,
toc,
citationInfo
};
}
4. Format and present the output
## {title} {isOnlineFirst ? "[网络首发]" : ""}
**Authors:**
{For each author: "- {name} ({affiliation})"}
**Affiliations:**
{For each affiliation: "- {affiliation}"}
**Journal:** {journal}
**Publication Info:** {pubInfo}
**Abstract:**
{abstract}
**Keywords:** {keywords joined by ", "}
**Fund:** {fund}
**Classification:** {classification}
**Citation Network:**
{For each citation type: "- {label}: {count}"}
5. Fallback: snapshot-based parsing
If JS extraction fails, use browser action=snapshot mode=efficient and parse the accessibility tree:
- Title:
heading level 1 element
- Authors:
link elements whose URLs contain kcms2/author/detail
- Affiliations:
link elements whose URLs contain kcms2/organ/detail
- Abstract:
StaticText following "摘要:"
- Keywords:
link elements whose URLs contain kcms2/keyword/detail
- Fund:
link elements following "基金资助:"
- Classification:
StaticText following "分类号:"
Verified DOM Selectors
| Data | Selector | Notes |
|---|
| Paper section | .brief | Main paper info container |
| Title | .brief h1 | May contain icons, clean text needed |
| Authors | .brief h3.author:first-of-type a | Name in first text node; affiliation #s in child <sup> (e.g., 张三<sup>1,2</sup>) |
| Affiliations | .brief h3.author:nth-of-type(2) a | Text starts with "N." (e.g., "1.北京大学") |
| Abstract | .abstract-text | Full abstract text |
| Keywords | p.keywords a | Semicolon-separated keyword links |
| Fund | p.funds | Fund information text |
| Classification | .clc-code | CLC classification codes |
| Journal | .doc-top a | Source journal link |
| Online first | .brief .icon-shoufa | Present if paper is online first |
| Citation tabs | ul.module-tab.tpl_lieteratures li | data-id attr identifies type |