はじめに SPA では JavaScript によるクライアントレンダリングを考慮しないと、すべての要素をスクレイピングすることはできない。 そのため、実際のブラウザを使ってスクレイピングを行うことになる。 これを行うデファクトライブラリの一つに、Chrome チームが公式にサポートしている Puppeteer がある。Puppeteer は Chrome DevTools Protocol を介して Chrome の操作を行うためのライブラリである。Chrome DevTools Protocol とは Chrome を操作するための Protocol であり API 定義が含まれている。例えば、特定の URL に遷移して画面を描画したり、ボタンをクリックしたり、要素の情報を抜き取ったり、スクリーンショットを取得したりできる。 ただ、Puppeteer は JavaScript のライブ