vault backup: 2026-11-09 09:18:58

This commit is contained in:
admin committed 2026-11-09 09:18:58 +08:00
1 parent 856d0203da
commit 75072389db
42 files changed
+5994 -37

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
// 直接读评论管理页 DOM
import { evalViaBridge } from './client.mjs';
import fs from 'node:fs';
await evalViaBridge(`location.href='https://baijiahao.baidu.com/builder/rc/commentmanage/comment/all'`);
await new Promise(r => setTimeout(r, 12000));
const info = await evalViaBridge(`(() => ({
url: location.href,
text: (document.body ? document.body.innerText : '').slice(0, 12000),
// 找置顶标记
pinnedHints: Array.from(document.querySelectorAll('*'))
.filter(e => e.children.length === 0)
.map(e => (e.innerText || '').trim())
.filter(t => t && (t.includes('置顶') || t.includes('作者')))
.slice(0, 40)
}))()`);
fs.writeFileSync('out/comment-page.json', JSON.stringify(info, null, 2), 'utf8');
console.log('URL=' + String(info.url).replace(/[^\x20-\x7E]/g, '?'));
console.log('TEXTLEN=' + String(info.text).length);
console.log('PINNED_HINTS=' + (info.pinnedHints || []).length);
process.exit(0);