cnki-parse-results
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.
By cookjohn · 346 installs
npx skills add cookjohn/cnki-skills --skill cnki-parse-results
Source repository · Upstream listing
CNKI Parse Search Results
Extract structured paper data from the current CNKI search results page.
Prerequisites
The current Chrome page must be a CNKI search results page (URL contains kns.cnki.net and page shows "条结果").
Steps
1. Verify we are on a results page
Use mcp chrome devtools take snapshot . Verify the page contains "条结果". If not, inform the user that no search results page is currently open.
Check for captcha ("拖动下方拼图完成验证") if found, notify user to solve it manually.
2. Extract results via JavaScript
Use mcp chrome devtools evaluate script with this function:
3. Present results
Format as a numbered list:
4. Fallback: snapshot based parsing
If JavaScript returns empty (DOM structure changed), use mcp chrome devtools take snapshot and parse the accessibility tree manually:
Look for the repeating pattern:
checkbox → StaticText (number) → link with URL containing kcms2/article/abstract (title) → link s with URL containing kcms2/author/detail (authors) → link with URL containing navi.cnki.net/knavi/detail (journal) → StaticText (date) → StaticText (database type)
Verified DOM Selectors (CNKI uses jQuery, stable semantic class names)
Data Selector Notes
Table .result table list tbody tr Each row = one paper
Checkbox input.cbItem value = export encrypted ID
Number td.seq Row sequence number
Title td.name a.fz14 Paper title link
Authors td.author a.KnowledgeNetLink Author name links
Journal td.source a Journal/source link
Date td.date Publication date text
DB Type td.data Database type (期刊/学位论文)
Citations td.quote Citation count
Downloads td.download Download count
Online 1st td.name .marktip "网络首发" label
Total .pagerTitleCell "共找到 X 条结果"
Page .countPageMark "1/300" format