title: Node.js scraping with chrome-remote-interface
body: <p>I have been trying to scrape a website protected by Distil Networks,
  in which using selenium (with Python) would just always fail.</p>
  
  <p>I did a few searches, and my conclusion is that the site can detect you are using Selenium by using some sort of javascript. I then took a loot at <code>chrome-remote-interface</code>, like it is the thing that I want, but then I got stuck. </p>
  
  <p>What I would like to do is to automate following steps:</p>
  
  <ol>
  <li>Open a Chrome instance</li>
  <li>Navigate to a page</li>
  <li>Run some javascript</li>
  <li>Collect data and save to file</li>
  <li>Repeat steps 2 - 4</li>
  </ol>
  
  <p>I know that I can open a instance of Chrome for debugging by:</p>
  
  <pre><code>google-chrome --remote-debugging-port=9222
  </code></pre>
  
  <p>And I can open a console on node by:</p>
  
  <pre><code>chrome-remote-interface -t 127.0.0.1 -p 9222 inspect -r
  </code></pre>
  
  <p>I can also run simple scripts like </p>
  
  <pre><code>Page.navigate({url:"https://google.com"})
  Runtime.evaluate({expression:"1+1"})
  </code></pre>
  
  <p>But like I can't get the DOMs directly on Node.js as what I could do on the Chrome Developer Tools console. Basically what I want is run scripts on Node like what I could do on the Chrome Developer Tools console.</p>
  
  <p>Also , there are not enough documentation on <code>chrome-remote-interface</code> for scraping. Is there any good links for that?</p>