Skip to content

Instantly share code, notes, and snippets.

@Chadtech
Created April 27, 2016 19:26
Show Gist options
  • Select an option

  • Save Chadtech/00f8ee40cab3e2b17838fa0338ab8f47 to your computer and use it in GitHub Desktop.

Select an option

Save Chadtech/00f8ee40cab3e2b17838fa0338ab8f47 to your computer and use it in GitHub Desktop.
req = require 'request'
cheerio = require 'cheerio'
_ = require 'lodash'
tweeter = process.argv[2]
req 'https://www.twitter.com/' + tweeter, (error, res, html) ->
if (not error) and (res.statusCode is 200)
twitterDotCom = cheerio.load html
tweets = twitterDotCom '.tweet-text'
tweets = _.map tweets, (t) ->
t.children[0].data
else
console.log error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment