• Stars
    star
    443
  • Rank 98,504 (Top 2 %)
  • Language
    Go
  • Created over 3 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

twmd: CLI/GUI Apiless twitter downlaoder. Download medias from single tweet or a whole profile.

twmd: CLI & GUI twitter media downloader (without api key)

This twitter downloader doesn't require Credentials or an api key. It's based on twitter-scrapper.

Unfortunately, you will not be able to download more than 3200 tweets.

gui

usage:

Usage:
-h, --help                   Show this help
-u, --user     USERNAME      User you want to download
-t, --tweet    TWEET_ID      Single tweet id to download
-n, --nbr      NBR           Number of tweets to download
-i, --img                    Download images only
-v, --video                  Download videos only
-a, --all                    Download images and videos
-r, --retweet                Download retweet too
-z, --url                    Print media url without download it
-R, --retweet-only           Donwload only retweet
-s, --size     SIZE          Choose format between small|normal|large
                             (default large)
-U, --update                 Download missing tweet only
-L, --login                  Log in to your account
-o, --output   DIR           Output directory
-p, --proxy    PROXY         Use proxy (proto://ip:port)
-V, --version                Print version and exit
-B, --[no-]banner            Don't print banner

Examples:

Download 300 tweets from @Spraytrains.

If the tweet doesn't contain a photo or video nothing will be downloaded but it will count towards the 300.

twmd -u Spraytrains -o ~/Downlaods -a -n 3000

You can use -r|--retweet to download retweets as well, or -R|--retweet-only to download retweet only

-U|--update will only download missing media.

Download a single tweet:

twmd -t 156170319961391104

NSFW tweets

You'll need to login -L|--login for downloading nsfw tweets.

Using proxy

Both http and socks4/5 can be used:

twmd  --proxy socks5://127.0.0.1:9050 -t 156170319961391104

Installation:

Note: If you don't want to build it you can download prebuilt binaries here.

Cli:

git clone https://github.com/mmpx12/twitter-media-downloader.git
cd twitter-media-downloader
make
sudo make install
# OR
sudo make all
# Clean
sudo make clean

Gui:

git clone https://github.com/mmpx12/twitter-media-downloader.git
cd twitter-media-downloader
# linux
make linux-gui
# windows
make windows-gui

Termux (no root):

installation:

git clone https://github.com/mmpx12/twitter-media-downloader.git
cd twitter-media-downloader
make
make termux-install
# OR
make termux-all
# Clean
make termux-clean

You may also want to add stuff in ~/bin/termux-url-opener to automatically download profile or post when share with termux.

cd ~/storage/downlaods
if grep twitter <<< "$1" >/dev/null; then
  if [[ $(tr -cd '/' <<< "$1" | wc -c) -eq 3 ]]; then
    userid=$(cut -d '/' -f 4 <<< "$1" |  cut -d '?' -f 1)
    echo "$userid"
    twmd -B -u "$userid" -o twitter -i -v -n 3000
  else 
    postid=$(cut -d '/' -f 6 <<< "$1" |  cut -d '?' -f 1)
    twmd -B -t "$postid" -o twitter
  fi
fi

Check here for a full termux-url-opener example.

Gifs are not supported at the moment.