const sleep=ms=>new Promise(r=>setTimeout(r,ms)); let node = null; for (const el of document.querySelectorAll('*')) if (el.children.length === 0 && (el.textContent || '').trim().startsWith('全部 (')) { node = el; break; } let root = node; for (let i = 0; i < 12 && root.parentElement; i++) { root = root.parentElement; if ((root.innerText||'').length > 30) break; } // find scrollable ancestor/descendant let sc = null; for (const el of root.querySelectorAll('*')) if (el.scrollHeight > el.clientHeight + 20) { sc = el; break; } if (!sc) { let t=root; for(let i=0;i<6&&t;i++){ if(t.scrollHeight>t.clientHeight+20){sc=t;break;} t=t.parentElement; } } if (!sc) return {err:'no scroll container', h: root.scrollHeight, c: root.clientHeight}; const seen = new Set(); const grab = () => { for (const el of sc.querySelectorAll('*')) if (el.children.length===0) { const t=(el.textContent||'').trim(); if (/\(\d+\)$/.test(t)) seen.add(t); } }; grab(); for (let y = 0; y < sc.scrollHeight; y += Math.max(80, sc.clientHeight - 40)) { sc.scrollTop = y; await sleep(250); grab(); } sc.scrollTop = sc.scrollHeight; await sleep(300); grab(); return {n: seen.size, list: [...seen]};