title: How to scrape websites from within browser?
body: <p>I would like to scrape a website by just running code in a browser.  In this case, the scraper has to run on a specific machine, and I cannot install <em>any</em> software on that machine.  However, there is already a browser installed (recent version of Firefox), and I can configure the browser however I want.  </p>
  
  <p>What I would like is a javascript solution for scraping, contained in a webpage on site A, that can scrape site B.  It seems like this would run into some CORS-type problems; I assume that part of the solution is to disable any cross-origin checks in the browser.</p>
  
  <p>What I have tried so far:  I looked up "web scraping in javascript", this brings up a lot of stuff intended to run in nodejs with cheerio for example <a href="http://scotch.io/tutorials/javascript/scraping-the-web-with-node-js" rel="nofollow noreferrer">this tutorial</a>, and also stuff like <a href="http://nrabinowitz.github.io/pjscrape/" rel="nofollow noreferrer">pjscrape</a> which requires PhantomJS.  However, I couldn't find anything equivalent that is intended to run in a browser.</p>
  
  <p>P.S. This is interesting: <a href="https://stackoverflow.com/questions/667519/firefox-setting-to-enable-cross-domain-ajax-request">Firefox setting to enable cross domain ajax request</a>  Apparently <code>Chrome --disable-web-security</code> takes care of the cross-origin/cross-domain issues.  Firefox equivalent?</p>
  
  <p>P.S. Looks like ForceCORS extension to Firefox is also useful: <a href="http://www-jo.se/f.pfleger/forcecors" rel="nofollow noreferrer">http://www-jo.se/f.pfleger/forcecors</a>  I'm not sure if I'll be able to install that though.</p>
  
  <p>P.S. This is a nice collection of ways to allow cross-domain in different browsers: <a href="http://romkey.com/2011/04/23/getting-around-same-origin-policy-in-web-browsers/" rel="nofollow noreferrer">http://romkey.com/2011/04/23/getting-around-same-origin-policy-in-web-browsers/</a>  Sadly, the suggested Firefox solution doesn't work in versions >=5.</p>