Giter Club home page Giter Club logo

twitter-video-threads's Introduction

Twitter Video Thread Downloader

Because sometimes, you just want to dowload 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] <tweetID>

Fetch all videos from a Twitter (TikTok) thread

Positionals:
tweetID  The ID of the most recent tweet to begin working backward from
[string]

Options:
      --version       Show version number                              [boolean]
  -k, --api-key       Your Twitter API key (will overwrite env variable `TWITTER
                      _API_KEY`)                             [string] [required]
  -d, --destination   Download destination folder for videos.
                                                 [string] [default: ~/Downloads]
  -l, --limit         Limit the total number of tweets to process.
                                                    [number] [default: Infinity]
  -s, --stop-at       A tweet 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 1368126334824837123, and save them in ~/Movies/TikToks

npx twitter-video-threads -k SAMPLEAPIKEY123456789 -d $HOME/Movies/TikToks 1368126334824837123

Now I'm going to move that API key into my shell's environment. There are new tweets in the thread, so I want to archive just the ones that were posted since my last archive.

export 'TWITTER_API_KEY=SAMPLEAPIKEY123456789'

npx twitter-video-threads --stop-at 1368126334824837123 1384389220912050179

In fact, all of the possible options can also be passed in as environment variables prepended with TWITTER_ if you really want, i.e. TWITTER_DESTINATION, TWITTER_LIMIT, TWITTER_STOP_AT

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

npx twitter-video-threads --limit 1 1386693203936559105

Development

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

npm run dev -- [options] <tweetID>

To compile

npm run prepublish

To run local compiled version

./run.js [options] <tweetId>

twitter-video-threads's People

Contributors

gesa avatar

Stargazers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.