Available here: https://gist.github.com/rodrigopolo/40029718a85963399784ae35b06adcaf
Dependencies:
yt-dplwgetaria2cffmpeg
Set the file permissions with chmod +x downloader.sh and run the script, with the URL of the Twitter/X Space as the first argument:
./downloader.sh https://twitter.com/i/spaces/1djxXNyNogvGZ
BTW, you can also use
yt-dlp, already supports ithttps://github.com/yt-dlp/yt-dlp
It is a fork of
youtube-dl, here is a cheat sheethttps://github.com/rodrigopolo/cheatsheets/blob/master/youtube-dl.md