1.0.0 • Published 12 months ago

twitter-video-threads v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

Twitter Video Thread Downloader

Because sometimes, you just want to download that entire TikTok thread and watch them all on the big screen.

Requirements

expects to find ffmpeg, idk, somewhere in your path.
(TODO: add an option to specify ffmpeg location)

Usage

npx twitter-video-threads [options] <postUrl>

Fetch all videos from a Mastodon (TikTok) thread

Positionals:
postUrl  The url of the most recent post to begin working backward from
[string]

Options:
      --version       Show version number                              [boolean]
  -d, --destination   Download destination folder for videos.
                                             [string] [default: $HOME/Downloads]
  -l, --limit         Limit the total number of posts to process.
                                                    [number] [default: Infinity]
  -s, --stop-at       A post ID at which point to stop recursively downloading.
                       Helpful if you've already downloaded this thread before.
                                                                        [string]
      --through-date  A date through which to download. Format as YYYY-MM-DD or
                      any other string Date.parse can make sense of.    [string]
  -v, --verbose       Chatty logs. More "v"s for more logging.
                                                            [count] [default: 0]
      --help          Show help                                        [boolean]

Some examples

First, I want to archive all of the videos from this thread, starting at https://mastodon.example/@jude_doe/1103530506860520971368126334824837123, and save them in ~/Movies/TikToks

npx twitter-video-threads -d $HOME/Movies/TikToks https://mastodon.example/@jude_doe/1368126334824837123

There are new posts in the thread, so I want to archive just the ones that were posted since my last archive.

npx twitter-video-threads --stop-at 1368126334824837123 https://mastodon.example/@jude_doe/1384389220912050179

In fact, all of the possible options can also be passed in as environment variables prepended with MASTO_ if you really want, i.e. MASTO_DESTINATION, MASTO_LIMIT, MASTO_STOP_AT

Today I just want to archive this one because it keeps making me giggle.

npx twitter-video-threads --limit 1 https://mastodon.example/@jude_doe/1386693203936559105

Development

Easy-peasy, all the functional code is in src/index.ts. To run uncompiled during development:

npm run dev -- [options] <postUrl>

To compile

npm run prepublish

To run local compiled version

./run.js [options] <postUrl>
1.0.0

12 months ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.4

3 years ago

0.3.2

3 years ago

0.3.3

3 years ago

0.3.1

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago