shichao-an / twitter-photos

Simple, fast command-line tool to get photos from Twitter accounts
https://twitter-photos.shichao.io
BSD 2-Clause "Simplified" License
171 stars 39 forks source link

Support for downloading gifs, videos, and file name formatting #10

Closed dannytaylor closed 7 years ago

dannytaylor commented 7 years ago

Sorry if this is messy, I'm not too familiar with python or pull requests.

I added a -v, --video flag to include videos and gifs (which are converted to videos by twitter) to be downloaded. Not sure why but only some videos and gifs get downloaded with this method. Quick troubleshooting session seems to indicate it might be an issue with the Twitter API at the moment.

Added an -f, --filenaming flag to enable formatting file names by tweet date, time, twitter handle, and media number (for tweets with multiple images). This is what I added the datetime module for. E.g. 170126_162000_dannytaylor_0.mp4 instead of C2r0qBzUoAAGIpK.mp4.

dannytaylor commented 7 years ago

Not sure what I've done to break the increment test, will take another look tomorrow.