Skip to content

p1atdev/twimedia-wizard

Repository files navigation

TwiMedia Wizard

Deno Testing deno compatibility codecov

Twitter media donwloader.

You need Deno to use.

Deno installation

  • macOS or Linux
curl -fsSL https://deno.land/x/install/install.sh | sh
  • Windows
scoop install deno

Usage

Clone repository and build

git clone https://github.com/p1atdev/twimedia-wizard.git
cd twimedia-wizard
deno task build

then twimedia.exe (or twimedia) will be generated to project root.

Help

twimedia --help

--help or -h

User

Specifying user to download.

twimedia user TWITTER_USER_ID --max 50  -o ./output
  • -h, --help - Show this help.
  • -o, --output - Output path. (required)
  • -m, --max - Maximum number of media to download. Default is 5000
  • -d, --dump [boolean] - Dump information to a json file.

Search (deprecated)

This method is not working now.

Specifying search query to search and download.

twimedia search SEARCH_QUERY -o ./output
  • -h, --help - Show this help.
  • -o, --output - Output path. (required)
  • -m, --max - Maximum number of media to download. Default is 5000
  • -l, --latest - Download media from Latest tweets. If not specified, it will download media from Top tweets.
  • -d, --dump [boolean] - Dump information to a json file.

List

Specifying list id to download.

twimedia list TWITTER_LIST_ID --max 50  -o ./output
  • -h, --help - Show this help.
  • -o, --output - Output path. (required)
  • -m, --max - Maximum number of media to download. Default is 5000
  • -d, --dump [boolean] - Dump information to a json file.

Download

Download from dumped json.

twimedia download path/to/json -o ./output
  • -h, --help - Show this help.
  • -o, --output - Output path. (required)
  • --min-favorites - Minimum number of favorites to download. (Default: 10)
  • --min-retweets - Minimum number of retweets to download. (Default: 0)
  • --caption [boolean] - Download captions. (Default: false)

TODO

  • [-] Filtering with likes. (only works with dumped json)