Skip to content

Instantly share code, notes, and snippets.

@maxpaynestory
maxpaynestory / scrape_tweets.js
Created September 5, 2014 17:59
Scrape all tweets from a twitter account using casperjs and phantomjs
String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g, '');}
String.prototype.ltrim=function(){return this.replace(/^\s+/,'');};
String.prototype.rtrim=function(){return this.replace(/\s+$/,'');};
String.prototype.fulltrim=function(){return this.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g,'').replace(/\s+/g,' ');};
Date.prototype.MMDDYYYY = function() {
@maxpaynestory
maxpaynestory / scrape_imdb_listing.js
Created August 27, 2014 16:14
Scrape imdb movie listing to csv file with images using casperjs and phantomjs
String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g, '');}
String.prototype.ltrim=function(){return this.replace(/^\s+/,'');};
String.prototype.rtrim=function(){return this.replace(/\s+$/,'');};
String.prototype.fulltrim=function(){return this.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g,'').replace(/\s+/g,' ');};
convertToSlug = function(Text)
{
return Text
@maxpaynestory
maxpaynestory / import_orders_from_amazon.js
Created August 27, 2014 16:07
Scrape Amazon Seller central orders using casperjs and phantomjs
String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g, '');}
String.prototype.ltrim=function(){return this.replace(/^\s+/,'');};
String.prototype.rtrim=function(){return this.replace(/\s+$/,'');};
String.prototype.fulltrim=function(){return this.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g,'').replace(/\s+/g,' ');};
Date.prototype.MMDDYYYY = function() {