jeff1evesque / earthquake-finder

Determine largest earthquake relative to GPS coordinates using URL dataset
2 stars 1 forks source link

Create 'retriever_dataset.js' #28

Closed jeff1evesque closed 9 years ago

jeff1evesque commented 9 years ago

After we have installed phantomjs, we will create retriever_dataset.js. This file will be used to scrape the content of our dataset.

jeff1evesque commented 9 years ago

We will scrape data off the provided url using similar logic to the following:

//phantomjs
  var page = require('webpage').create();
  var url = 'http://instagram.com/';

  page.open(url, function (status) {
    var js = page.evaluate(function () {
    return document;
  });
  console.log(js.all[0].outerHTML);
  phantom.exit();
}); 
jeff1evesque commented 9 years ago

Now that we have defined json_scraper.py, we will define an ajax process, such that the dataset is returned to retriever_dataset.js