Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/automation/keywordFollow.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@
await sleep(1000);
};

const getBioFromUserCell = (cell) => {
// bio 通常是 dir="auto" 且带 overflow hidden(简介会截断)
const bioDiv = [...cell.querySelectorAll('div[dir="auto"]')]
.find(d => (d.getAttribute('style') || '').includes('overflow: hidden'));
return (bioDiv?.textContent || '').trim();
};

// ============================================
// USER EXTRACTION
// ============================================
Expand All @@ -85,7 +92,7 @@
const displayName = nameEl?.textContent || username;

const bioEl = userCell.querySelector('[data-testid="UserDescription"]');
const bio = bioEl?.textContent || '';
const bio = bioEl?.textContent || getBioFromUserCell(userCell);

// Try to get follower count (might not always be visible)
const statsText = userCell.textContent || '';
Expand Down