skip to navigation
skip to content

Not Logged In

twitter-photos 0.1.1

Command-line tool to get photos from Twitter accounts.

Twitter Photos is a command-line tool to get photos from Twitter accounts.


  • python-twitter
  • requests
  • urllib3


You can install the package with pip:

$ pip install twitter-photos

Or, you can download a source distribution and install with these commands:

$ python install

How It Works

The command-line front-end of Twitter Photos, twphotos, downloads photos from specified Twitter accounts into individual directories each named after username. It hits the Twitter API as little as possible to retrieve photos links and download each link separately. You can view the links yourself and pipe them to other programs such as wget. You can specifiy photo size, number of photos to get, and whether to download new photos since last downloads.


Create a config file at ~/.twphotos specifying your Twitter credentials:

consumer_key = your_consumer_key
consumer_secret = your_consumer_secret
access_token_key = your_access_token_key
access_token_secret = your_access_token_secret


The simplest usage is to run “twphotos” from command-line without any options. This will download all photos from the current authenticated user (you):

$ twphotos

Download all photos from an existing user other than yourself with -u option followed by username. “twphotos” will automatically create a directory with the specified username and put downloaded photos in there:

$ twphotos -u wired

Download n most recent photos from a user using -n followed by number:

$ twphotos -u wired -n 20

Download photos to a directory other than the current one:

$ twphotos -u wired -o /path/to/dir

Enable “incremental download” to download new photos since the last downloads with -i:

$ twphotos -u wired -i

Enable “parallel download” to speedup the downloads using the -r switch:

$ twphotos -u wired -r

Print username, tweet ids, and URLs instead of downloading them with -p switch:

$ twphotos -u wired -p

Exclude replies tweets using -e switch:

$ twphotos -u wired -e

Download small-sized photos

$ twphotos -u wired -s small

You can retrieve URLs only with cut command:

$ twphotos -u wired -p | cut -d ' ' -f3

Command-line Options

The “soundmeter” command accepts the following options:

<kbd>-u <var>USER</var>, --user <var>USER</var></kbd>
 user account
<kbd>-l <var>LIST_SLUG</var>, --list <var>LIST_SLUG</var></kbd>
 list slug with –user as list owner
<kbd>-o <var>OUTDIR</var>, --outdir <var>OUTDIR</var></kbd>
 output directory
<kbd>-p, --print</kbd> print media urls and tweet ids instead of download
<kbd>-r, --parallel</kbd> enable parallel download
<kbd>-n <var>NUM</var>, --num <var>NUM</var></kbd>
 number of most recent photos to download
<kbd>-i, --increment</kbd>
 download only new photos since last download
<kbd>-e, --exclude_replies</kbd>
 exclude replies
<kbd>-s <var>SIZE</var>, --size <var>SIZE</var></kbd>
 photo size (large, medium, small and thumb)
File Type Py Version Uploaded on Size
twitter-photos-0.1.1.tar.gz (md5) Source 2014-02-20 80KB
  • Downloads (All Versions):
  • 2 downloads in the last day
  • 28 downloads in the last week
  • 116 downloads in the last month