Skip to content

Instantly share code, notes, and snippets.

View shiflett's full-sized avatar

Chris Shiflett shiflett

View GitHub Profile
@shiflett
shiflett / gist:e8f2d6e43fe8ae6a603bf7dc4053c34e
Last active April 1, 2016 03:52
Scrape a Twitter Profile for Tweets
#! /bin/bash
# Based on https://gist.github.com/scoates/5935435
for u in $*; do
echo $u
curl -sL http://twitter.com/$u | \
grep 'tweet-text tweet-text' | head -5 | perl -pe 's/.*?>(.*)<\/p>/\1/;s/<.*?>//g'
echo
done
@shiflett
shiflett / gist:d98f8f37c4b7bcd25de1
Last active April 1, 2016 03:48
Scrape a Twitter Profile for Bio
#! /bin/bash
# Based on https://gist.github.com/scoates/5935435
for u in $*; do
echo $u
curl -sL http://twitter.com/$u > /tmp/tw.html
cat /tmp/tw.html | grep '<title' | perl -pe 's/.*?>//;s/ \(.*//'
cat /tmp/tw.html | grep ProfileAvatar-image | head -n1 | perl -p -e's/.*?http/http/;s/".*//'
cat /tmp/tw.html | grep ProfileHeaderCard-bio -a2 | tail -n1 | perl -pe 's/.*?>(.*)<\/p>/\1/;s/<.*?>//g'

Keybase proof

I hereby claim:

  • I am shiflett on github.
  • I am shiflett (https://keybase.io/shiflett) on keybase.
  • I have a public key whose fingerprint is 7314 C4BF 51E9 F78D 0B30 6746 7721 ED52 86D8 2CBC

To claim this, I am signing this object: