Screenshots
GUI
CLI
Requirements
ffmpegif not using portable binaries.- A logged in user's cookies file exported from Twitter in the Netscape format.
Install
GUI
Use this if you're not sure.
From portable binaries
From source
pip install git+https://github.com/HoloArchivists/twspace-dl@gooey
CLI
From portable binaries
From PyPI
pip install twspace-dl
From source
pip install git+https://github.com/HoloArchivists/twspace-dl
Usage
twspace_dl -i space_url -c COOKIE_FILE
Features
Here's the output of the help option
usage: twspace_dl [-h] [-v] [-s] [-k] [-l] -c COOKIE_FILE
[-i SPACE_URL | -U USER_URL] [-d DYN_URL] [-f URL] [-M PATH]
[-o FORMAT_STR] [-m] [-p] [-u] [--write-url URL_OUTPUT] [-e]
Script designed to help download twitter spaces
options:
-h, --help show this help message and exit
-v, --verbose
-s, --skip-download
-k, --keep-files
-l, --log create logfile
-c COOKIE_FILE, --input-cookie-file COOKIE_FILE
cookies file in the Netscape format. The specs of the
Netscape cookies format can be found here:
https://curl.se/docs/http-cookies.html. The cookies
file is now required due to the Twitter API change
that prohibited guest user access to Twitter API
endpoints on 2023-07-01.
input:
-i SPACE_URL, --input-url SPACE_URL
-U USER_URL, --user-url USER_URL
-d DYN_URL, --from-dynamic-url DYN_URL
use the dynamic url for the processes(useful for ended
spaces) example: https://prod-fastly-ap-northeast-
1.video.pscp.tv/Transcoding/v1/hls/zUUpEgiM0M18jCGxo2e
SZs99p49hfyFQr1l4cdze-Sp4T-
DQOMMoZpkbdyetgfwscfvvUkAdeF-
I5hPI4bGoYg/non_transcode/ap-northeast-1/periscope-
replay-direct-prod-ap-northeast-1-public/audio-
space/dynamic_playlist.m3u8?type=live
-f URL, --from-master-url URL
use the master url for the processes(useful for ended
spaces) example: https://prod-fastly-ap-northeast-
1.video.pscp.tv/Transcoding/v1/hls/YRSsw6_P5xUZHMualK5
-ihvePR6o4QmoZVOBGicKvmkL_KB9IQYtxVqm3P_vpZ2HnFkoRfar4
_uJOjqC8OCo5A/non_transcode/ap-northeast-1/periscope-
replay-direct-prod-ap-northeast-1-public/audio-
space/master_playlist.m3u8
-M PATH, --input-metadata PATH
use a metadata json file instead of input url (useful
for very old ended spaces)
output:
-o FORMAT_STR, --output FORMAT_STR
-m, --write-metadata write the full metadata json to a file
-p, --write-playlist write the m3u8 used to download the stream(e.g. if you
want to use another downloader)
-u, --url display the master url
--write-url URL_OUTPUT
write master url to file
-e, --embed-cover embed user avatar as cover art
Format
You can use the following identifiers for the formatting
%(title)s
%(id)s
%(start_date)s
%(creator_name)s
%(creator_screen_name)s
%(url)s
%(creator_id)s
Example: [%(creator_screen_name)s]-%(title)s|%(start_date)s
Known Errors
Changing ID3 metadata in HLS audio elementary stream is not implemented....
This is an error in ffmpeg that does not affect twspace_dl at all as far as I know.
Service
To run as a systemd service please refer to https://github.com/HoloArchivists/twspace-dl/blob/main/SERVICE.md
Docker
Run once
docker run --rm -v .:/output holoarchivists/twspace-dl -i space_url
Run as monitoring service
- Download the
docker-compose.yml,.env,monitor.shfiles and put them in a folder namedtwspace-dl. - Edit
.envand fill in the Twitter username you want to monitor. - Put a cookies file into the folder and named it
cookies.txt. docker-compose up -d
Metadata
Release files for twspace-dl 2024.7.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| twspace_dl-2024.7.2.1.tar.gz | 22.9 kB | Without provenance | Details for twspace_dl-2024.7.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| twspace_dl-2024.7.2.1-py3-none-any.whl | Python 3 | none | any | Details for twspace_dl-2024.7.2.1-py3-none-any.whl |
Total release size: 46.3 kB
Release files / twspace_dl-2024.7.2.1.tar.gz
| Download URL | twspace_dl-2024.7.2.1.tar.gz |
|---|---|
| Size | 22.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18bb3e50610eb1d19ca7f98487ed7656cf97958d60a04aa5ed4380bd5562d698
|
|
BLAKE2b-256 checksum How to use checksums |
9ce0b5f8d05405d80cb7ca8ee437e9f15dbefc988301dea7673ad032e4b96193
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Release files / twspace_dl-2024.7.2.1-py3-none-any.whl
| Download URL | twspace_dl-2024.7.2.1-py3-none-any.whl |
|---|---|
| Size | 23.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
22232d4cb61a6dfd2df08ef3bf610ee8a082ea5d34ce68aa5ddb45806d401925
|
|
BLAKE2b-256 checksum How to use checksums |
ceffc51e903c1b7944c608df42cb0fa233223a50d88d320dd4aa6fbc35d9fb52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Security for twspace-dl 2024.7.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.