Skip to content

offish/twitter-x-broadcast-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

X/Twitter Broadcast Downloader

Download broadcasts or lives from X/Twitter.

Setup

pip install -r "requirements.txt"

Note

To disable downloading copy the example.env and name it .env. Set DOWNLOAD=0 this will still print data, but not download the broadcast. You can still play the broadcast using VLC media player. To do this, copy the printed playback URL and open VLC. In VLC "Open Network Stream" (CTRL+N), paste the URL and click Play.

Example

python main.py
>>> What is the broadcast URL? https://x.com/i/broadcasts/1RDGlAzQqqEJL
Got media key 28_2021602522801242112
Got playback URL https://prod-fastly-us-west-2.video.pscp.tv/Transcoding/v1/hls/BmY63zaa24XajQJ5Brrv9Jsyznzo7KkfPPA8ve50YRZ1FyOguUZQUQBfUnGTRWwUX-29F0n1mY7fs2fNK6fKZg/non_transcode/us-west-2/periscope-replay-direct-prod-us-west-2-public/master_dynamic_16674714432618967153.m3u8?type=replay
Downloading the broadcast as 28_2021602522801242112.mp4...
[generic] Extracting URL: https://prod-fastly-us-west-2.video.pscp.tv/Transcoding/v1/hls/BmY63zaa24XajQJ5Brrv9Jsyznzo7KkfPP...153.m3u8?type=replay 
[generic] master_dynamic_16674714432618967153: Downloading webpage 
[generic] master_dynamic_16674714432618967153: Downloading m3u8 information 
[generic] master_dynamic_16674714432618967153: Checking m3u8 live status 
[info] master_dynamic_16674714432618967153: Downloading 1 format(s): 16000 
[hlsnative] Downloading m3u8 manifest 
[hlsnative] Total fragments: 348 
[download] Destination: c:\Users\offish\twitter-broadcast-downloader\downloads\28_2021602522801242112.mp4 
[download] 100% of  766.14MiB in 00:01:28 at 8.63MiB/

Releases

No releases published

Packages

 
 
 

Contributors

Languages