Loading...
Loading...
Parse current CNKI search results page into structured paper data (title, authors, journal, date, citations). Use after a search has been performed and you need to extract the results.
npx skill4agent add cookjohn/cnki-skills cnki-parse-resultskns.cnki.netmcp__chrome-devtools__take_snapshotmcp__chrome-devtools__evaluate_script() => {
const rows = document.querySelectorAll('.result-table-list tbody tr');
const checkboxes = document.querySelectorAll('.result-table-list tbody input.cbItem');
const results = Array.from(rows).map((row, index) => {
const nameCell = row.querySelector('td.name');
const titleLink = nameCell?.querySelector('a.fz14');
const authorCell = row.querySelector('td.author');
const sourceCell = row.querySelector('td.source');
const dateCell = row.querySelector('td.date');
const dataCell = row.querySelector('td.data');
const quoteCell = row.querySelector('td.quote');
const downloadCell = row.querySelector('td.download');
const isOnlineFirst = !!nameCell?.querySelector('.marktip');
return {
number: index + 1,
title: titleLink?.innerText?.trim() || '',
url: titleLink?.href || '',
exportId: checkboxes[index]?.value || '',
authors: Array.from(authorCell?.querySelectorAll('a.KnowledgeNetLink') || []).map(a => a.innerText?.trim()),
journal: sourceCell?.querySelector('a')?.innerText?.trim() || '',
date: dateCell?.innerText?.trim() || '',
database: dataCell?.innerText?.trim() || '',
citations: quoteCell?.innerText?.trim() || '',
downloads: downloadCell?.innerText?.trim() || '',
isOnlineFirst: isOnlineFirst
};
});
const totalText = document.querySelector('.pagerTitleCell')?.innerText || '';
const totalMatch = totalText.match(/([\d,]+)/);
const pageInfo = document.querySelector('.countPageMark')?.innerText || '';
return {
papers: results,
totalCount: totalMatch ? totalMatch[1] : 'unknown',
pageInfo: pageInfo
};
}CNKI search results ({totalCount} total, page {pageInfo}):
1. {title} {isOnlineFirst ? "[网络首发]" : ""}
Authors: {authors joined by "; "}
Journal: {journal} | Date: {date} | Type: {database}
Citations: {citations} | Downloads: {downloads}
URL: {url}
2. ...mcp__chrome-devtools__take_snapshotcheckboxStaticTextlinkkcms2/article/abstractlinkkcms2/author/detaillinknavi.cnki.net/knavi/detailStaticTextStaticText| Data | Selector | Notes |
|---|---|---|
| Table | | Each row = one paper |
| Checkbox | | value = export encrypted ID |
| Number | | Row sequence number |
| Title | | Paper title link |
| Authors | | Author name links |
| Journal | | Journal/source link |
| Date | | Publication date text |
| DB Type | | Database type (期刊/学位论文) |
| Citations | | Citation count |
| Downloads | | Download count |
| Online 1st | | "网络首发" label |
| Total | | "共找到 X 条结果" |
| Page | | "1/300" format |