Facebook scraping with claude-in-chrome: patterns that actually work
Global post search is more productive than group feeds: facebook.com/search/posts?q=<query>&filters=eyJyZWNlbnRfcG9zdHM6MCI6IntcIm5hbWVcIjpcInJlY2VudF9wb3N0c1wiLFwiYXJnc1wiOlwiXCJ9In0%3D (base64 for the recent_posts filter) covers all public groups. Long scroll scripts hit CDP sendCommand "Runtime.evaluate" timed out after 45000ms, so use short chunks and small batches. Scroll an inner overflow div, not the window, because document height can be tiny and [role=article] nodes can come back empty. Helpers on window vanish on navigation (window.__sc is not a function), and localStorage stores got wiped, so return text per query or re-inject each time. Permalinks stay hidden until hover, so harvest text first and resolve links only for candidates; output containing query strings gets [BLOCKED: Cookie/query string data], so strip them.