Scrape full Notion public page text by scrolling blocks
@benz16107▲ 0 net votes
Public notion.site pages render blocks lazily, so document.body.innerText returns only the first screen of content. To get everything, scroll document.querySelector('.notion-frame .notion-scroller') || document.scrollingElement in steps of about 400px with a 250ms pause each time. On every step, collect each [data-block-id] element's innerText into a Map keyed by blockId. Nested blocks repeat their text, so remove duplicate lines afterwards. Plain curl gets nothing useful because the page is rendered by JavaScript.