Cnki Search

cookjohn/cnki-skills/skills/cnki-search

作者 cookjohn20d65f660456daf53ad0f7c74494ac3b829b925f無授權條款983 個星標收錄於 2026年10月9日更新於 2026年10月9日儲存庫7 個月前更新

Search CNKI (中国知网) for papers by keyword. Use when the user wants to find academic papers on a topic.

AI 產生的概覽

透過瀏覽器自動化依關鍵字檢索中國知網(CNKI),回傳結構化的學術論文清單。

功能
此技能透過 Chrome DevTools MCP 瀏覽器工作階段開啟 CNKI 檢索頁面,填入指定關鍵字並送出查詢,再擷取目前結果頁。它會回傳結果總數、頁碼指示,以及包含標題、連結、匯出 ID、作者、期刊、日期、被引用次數與下載次數的結構化論文清單。文件也說明驗證碼偵測方式,以及如何以網址直接開啟某篇論文。
適用情境
當使用者需要在 CNKI 上尋找某個主題的學術論文,並想取得標題、作者、期刊、日期或被引用與下載資料時使用。也適合後續要開啟某筆結果,或把結果交給 Zotero 匯出流程的請求。
執行需求
需要 Chrome DevTools MCP 工具(navigate_page、evaluate_script),以及連線至 kns.cnki.net 的網路存取。此技能未附帶指令碼,僅為操作說明。CNKI 工作階段可能出現驗證碼,須由使用者自行完成驗證。

CNKI Basic Search

Search CNKI for papers using keyword(s). Returns result count and structured result list (titles, URLs, authors, journal, date) in a single call.

Arguments

$ARGUMENTS contains the search keyword(s) in Chinese or English.

Steps

1. Navigate

Use mcp__chrome-devtools__navigate_page → https://kns.cnki.net/kns8s/search

2. Search + extract results (single evaluate_script, NO wait_for)

Replace YOUR_KEYWORDS with actual search terms:

javascript
async () => {  const query = "YOUR_KEYWORDS";
  // Wait for search input (replaces wait_for)  await new Promise((r, j) => {    let n = 0;    const c = () => { if (document.querySelector('input.search-input')) r(); else if (++n > 30) j('timeout'); else setTimeout(c, 500); };    c();  });
  // Check captcha (only if visible on screen, not hidden SDK at top:-1000000)  const outer = document.querySelector('#tcaptcha_transform_dy');  if (outer && outer.getBoundingClientRect().top >= 0) return { error: 'captcha' };
  // Fill and submit (verified selectors: input.search-input, input.search-btn)  const input = document.querySelector('input.search-input');  input.value = query;  input.dispatchEvent(new Event('input', { bubbles: true }));  document.querySelector('input.search-btn')?.click();
  // Wait for results  await new Promise((r, j) => {    let n = 0;    const c = () => { if (document.body.innerText.includes('条结果')) r(); else if (++n > 30) j('timeout'); else setTimeout(c, 500); };    c();  });
  // Check captcha again  const outer2 = document.querySelector('#tcaptcha_transform_dy');  if (outer2 && outer2.getBoundingClientRect().top >= 0) return { error: 'captcha' };
  // Extract current page results (merged parse-results)  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, i) => {    const titleLink = row.querySelector('td.name a.fz14');    const authors = Array.from(row.querySelectorAll('td.author a.KnowledgeNetLink') || []).map(a => a.innerText?.trim());    const journal = row.querySelector('td.source a')?.innerText?.trim() || '';    const date = row.querySelector('td.date')?.innerText?.trim() || '';    const citations = row.querySelector('td.quote')?.innerText?.trim() || '';    const downloads = row.querySelector('td.download')?.innerText?.trim() || '';    return {      n: i + 1,      title: titleLink?.innerText?.trim() || '',      href: titleLink?.href || '',      exportId: checkboxes[i]?.value || '',      authors: authors.join('; '),      journal,      date,      citations,      downloads    };  });
  return {    query,    total: document.querySelector('.pagerTitleCell')?.innerText?.match(/([\d,]+)/)?.[1] || '0',    page: document.querySelector('.countPageMark')?.innerText || '1/1',    results  };}

3. Report

Present results as a numbered list:

Searched CNKI for "$ARGUMENTS": found {total} results (page {page}).
1. {title}   Authors: {authors} | Journal: {journal} | Date: {date}   Citations: {citations} | Downloads: {downloads}
2. ...

4. Follow-up: navigate to a paper

When the user wants to open or download a specific paper, use navigate_page with the result's href URL directly — do NOT click the link (clicking opens a new tab and wastes 3 extra tool calls for tab management).

Captcha detection

Check #tcaptcha_transform_dy element's getBoundingClientRect().top >= 0. Tencent captcha SDK preloads DOM at top: -1000000px (off-screen, not active). Only return error: 'captcha' when top >= 0 (actually visible to user).

Verified selectors

ElementSelectorNotes
Search inputinput.search-inputid=txt_search, placeholder "中文文献、外文文献"
Search buttoninput.search-btntype="button"
Result count.pagerTitleCelltext "共找到 X 条结果"
Page indicator.countPageMarktext "1/300"
Result rows.result-table-list tbody trEach row = one paper
Title linktd.name a.fz14Paper title with href
Authorstd.author a.KnowledgeNetLinkAuthor name links
Journaltd.source aJournal/source link
Datetd.datePublication date text
Citationstd.quoteCitation count
Downloadstd.downloadDownload count

Batch export to Zotero

When user wants to save results to Zotero, use batch export directly from the results page — do NOT navigate to each detail page. The exportId in results equals the detail page's #export-id. Call cnki-export skill with batch mode (Step 1B). See cnki-export SKILL.md for details.

Tool calls: 2 (navigate + evaluate_script)

來源與署名

來源:cookjohn/cnki-skills位於skills/cnki-search提交20d65f6

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架