Giter VIP home page Giter VIP logo

threadreader_downloader's Introduction

Automatically download each tweet in a ThreadReaderApp-archived Twitter thread. This will also download all the media in each of the tweets using TWMD

How to use it:

To use this docker container:

docker run -v <dir_on_hostOS_for_downloads>/:/workdir -it sa7ori/threadreader_downloader

it will launch right into the downloader asking for a URL.

Then after everything has run, you'll get a directory like this:

Note: <dir_on_hostOS_for_downloads> is the fully qualified path of the directory that will be shared into the docker container. The container will download and log everything into that shared directory so it is available on the host.

Example:

docker run -v /home/s7ephen/great_twitterthread/:/workdir -it sa7ori/threadreader_downloader

Link to the Dockerhub:

https://hub.docker.com/r/sa7ori/threadreader_downloader

Using tools within the container:

To use the tools inside the container like m3u8_download to download media from a m3u8 link, use:

docker run -v <dir_on_hostOS_for_downloads>/:/workdir -it sa7ori/threadreader_downloader bash

To use m3u8_download:

m3u8_download https://urltosome/file/hosted/somwhere/v5dpHSFzJ33kY-QQ.m3u8 tweet_20.mp4

This will use ffmpeg to parse and follow/download all the m3u8 interlinked files and download (and reassemble) the media fragments and save to tweet_20.mp4 or whatever filename you give it.

Downloading Twitter Videos with m3u8_download:

You can use this to download videos directly from twitter also. To do this:

  • Turn on your browser's "Developer Tools"
  • Load (or reload) the tweet URL in your browser.
  • In the "Network" tab, enter m3u8 into the "filter"
  • If you see no results, refresh the page.
  • When a result appears (usually the first one) right clip and "Copy URL"
  • Paste that full URL into m3u8_download.

Example: fetching the m3u8 running m3u8_download

m3u8_download 'https://video.twimg.com/ext_tw_video/1763235266049777665/pu/pl/2fbRnL9S1NDv6Wcw.m3u8?variant_version=1&tag=12&container=cmaf' video.mp4

Extra Note: Downloading Multiple Twitter Threads

This whole repo was just a quick-hack so it isnt polished up to take command-line, arguments or have features like reading URLs from a file (as input).

I dont know who would find this useful (I make similar notes like this for myself, like I'm writing to a dumber future-self), but here is a simple mod to download multiple Twitter threads using what's here...with minimal asspain.

So to download multiple Twitter threads. Put all the URLs in a text file (one per line) then: while read in; do ./download_threadreaderapp_thread.py "$in"; done < threads_to_download.txt then you'll have a directry like this:

threadreader_downloader's People

Contributors

s7ephen avatar

Stargazers

Aliaksei avatar

Watchers

 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.