Skip to content

Instantly share code, notes, and snippets.

View AditiKhullar's full-sized avatar
💭
Working on a tutorial for PyData NYC

Aditi Khullar AditiKhullar

💭
Working on a tutorial for PyData NYC
  • Two Sigma
  • New York
View GitHub Profile
@AditiKhullar
AditiKhullar / text-scrapper.js
Last active December 3, 2019 07:09
Scrapes the text from a given URL into an output file. Initialize the phantomJS module using "module load phantomjs" and then scrape "phantomjs text-scraper.js https://www.coursera.org/course/ml output.txt"
var page = require('webpage').create();
var system = require('system');
var fs = require('fs');
if(system.args.length !== 3) {
console.log('Usage: phantomjs text-scraper.js <url> <output file>');
phantom.exit();
}
var url = system.args[1];