← ClaudeAtlas

cnki-navigate-pageslisted

Navigate CNKI search result pages (next/previous/specific page) or change sort order. Use when user wants to see more results or change sorting.
Jensen-Yao/agents-skills · ★ 0 · AI & Automation · score 68
Install: claude install-skill Jensen-Yao/agents-skills
# CNKI Results Pagination and Sorting All operations use a single async `evaluate_script` — no snapshot or wait_for needed. ## Arguments `the user request` should be one of: - `next` / `previous` / `page N` — pagination - `sort by date` / `sort by citations` / `sort by downloads` / `sort by relevance` / `sort by comprehensive` — sorting ## Pagination (single evaluate_script) Replace `ACTION_HERE` with `"next"`, `"previous"`, or `"page 3"`: ```javascript async () => { const cap = document.querySelector('#tcaptcha_transform_dy'); if (cap && cap.getBoundingClientRect().top >= 0) return { error: 'captcha' }; const action = "ACTION_HERE"; const pageLinks = document.querySelectorAll('.pages a'); const prevMark = document.querySelector('.countPageMark')?.innerText; if (action === 'next') { const next = Array.from(pageLinks).find(a => a.innerText.trim() === '下一页'); if (!next) return { error: 'no_next_page' }; next.click(); } else if (action === 'previous') { const prev = Array.from(pageLinks).find(a => a.innerText.trim() === '上一页'); if (!prev) return { error: 'no_previous_page' }; prev.click(); } else { const num = action.replace(/\D/g, ''); const target = Array.from(pageLinks).find(a => a.innerText.trim() === num); if (!target) return { error: 'page_not_found', available: Array.from(pageLinks).map(a => a.innerText.trim()) }; target.click(); } // Wait for page change await new Promise((r, j) => { let n = 0;