npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

twitter-video-threads

v1.0.0

Published

Download all the videos from a twitter (tiktok) thread.

Downloads

6

Readme

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>