Twitter Spaces Downloader

Download recorded Twitter Spaces and convert them to .mp3 locally and swiftly.


Description

pip install twspace-dl

Requirements

This shortcut uses the most reliable command line tool for downloading Twitter Spaces (at the time of its release, anyway) - a python package called twspace-dl. Even first time users of a-Shell or a-Shell Mini should find its installation process - pip install twspace-dl - absurdly quick.

By default, it receives a single recorded Twitter Spaces share URL (ex: https://twitter.com/i/spaces/1BdGYwZBgEzxX) from either the Share Sheet or the system clipboard, from which it parses the ID of the space before inserting the full URL into a standard twspace-dl download command:

twspace_dl -i ${URL}

Because of a-Shell's unique configuration and the way it interacts with Shortcuts, -o ~/Documents/audio/${id}.m4a is also added to the command to specify a usable location of the initial .m4a file.

(If you're satisfied with that format, feel free to delete the following command.)

Twitter Spaces Downloader Shortcut a-Shell Output

Since ffmpeg comes with both a-Shells, only a single additional step is required to convert incoming Spaces audio files to .mp3 format:

ffmpeg -i ~/Documents/audio/${id}.m4a -c:v copy -c:a libmp3lame -q:a 4 ~/Documents/audio/${id}.mp3

At least at the time of this writing, I think you'll find this exact configuration to be particularly efficient/apt for the average bitrates we're currently seeing from the platform in this context.


Contact


Latest Release Notes

1.0 - Aug. 24, 2022, 8:23 a.m.

Initial release.