title: How can I screen scrape a multi page application using javascript?
body: <p>How can I screen scrape a multi page application? I want to do this using Javascript. Here are the approaches I have considered and the problems I have encountered.</p>
  
  <p><strong>Using the Fetch web API in a Node application to get the web pages</strong></p>
  
  <p>Problem: The web pages won't load properly when being fetched. I guess all javascript on the page does not run when the page is fetched.</p>
  
  <p><strong>Running JavaScript from the console</strong></p>
  
  <p>This is a very simple way to inject JavaScript straight into the document. But one problem is that opening the web page is a browser and pasting into the console is manual work. Another problem is that while this works for single page application it becomes very cumbersome for multi-page applications.</p>
  
  <p><strong>What better approach exists that solves the problems I have encountered?</strong></p>