# Cnki Parse Results

Parse current CNKI search results page into structured paper data (title, authors...

- Repository: https://github.com/cookjohn/cnki-skills (1031 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-03-13
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add cookjohn/cnki-skills --skill cnki-parse-results -g -a claude-code -y`
Codex: `npx skills add cookjohn/cnki-skills --skill cnki-parse-results -g -a codex -y`
Cursor: `npx skills add cookjohn/cnki-skills --skill cnki-parse-results -g -a cursor -y`
Gemini CLI: `npx skills add cookjohn/cnki-skills --skill cnki-parse-results -g -a gemini-cli -y`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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:

```javascript
() => {
  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
    };
  });

The rest: https://github.com/cookjohn/cnki-skills/blob/HEAD/skills/cnki-parse-results/SKILL.md
