Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Get a twitter profile image from a username. We route around bad APIs. Twitter wears the scumbag hat, these days.
# Usage: $0 username
# e.g.:
# $ ./twitter_user_to_image coates
curl -sL$1 | grep profile_images | head -n1 | perl -p -e's/.*?http/http/;s/".*//;s/_bigger//'

This comment has been minimized.

Copy link

@beryllium beryllium commented Jul 5, 2013

Suggestion that might come in handy in the future: Add a user agent. :)

--user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0"

Or choose one from this list:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.