Downloads all photos, videos and GIFs from a Twitter user's media timeline
Just because you’ve liked or retweeted a piece of media on Twitter doesn’t mean that it will still be there tomorrow.
The author might suddenly become permanently suspended. Or they might have a lapse in judgment and irrevocably
delete a bunch of their old tweets. Or they might be “canceled” for Americentric ideological reasons and be bullied
into deleting tweets deemed inappropriate. Whatever the reason may be, the point is: if you like a user’s uploaded
media, you probably want to take local copies of them.
twimgdump is a small command-line tool I developed to help me take local copies of art uploaded by artists I follow
on Twitter. It retrieves all tweets posted to a Twitter user’s media timeline and saves the attached photos, videos
and animated GIFs to disk.
Usage:
twimgdump [options] [--] <username>
Options:
-c, --cursor <cursor>
Sets the initial cursor value.
-h, --help
Displays this help text.
-o, --output <output-file-path-template>
Sets the template used to determine the output file paths of
downloaded media. The tokens '[user-id]', '[username]',
'[tweet-id]', '[year]', '[month]', '[day]', '[hour]',
'[minute]', '[second]', '[millisecond]', '[media-id]', '[stem]',
'[extension]', '[index]', '[count]', '[width]' and '[height]'
will be substituted by the corresponding attributes of retrieved
media.
-t, --types <types>
Limits the types of media to be downloaded. Possible values are
'photo', 'video' and 'animated-gif'. Multiple values are
separated by commas.
-V, --version
Displays the version number.
[username]/[year]/[month]/[stem].[width]x[height][extension]
.dotnet build [-c Release]
Contributions are welcome – if you encounter any problems or have any suggestions for improvements, feel free to
create a new issue or open a draft pull request.