mirror of
https://github.com/Dasemu/x-space-downloader.git
synced 2026-10-13 21:49:45 +00:00
chore: polish repo for public release
Add MIT LICENSE, fix README clone URL and add CI/license badges, flesh out setup.py metadata, add a GitHub Actions test workflow, and remove dead code left over from earlier iterations. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
17
README.md
17
README.md
@@ -1,5 +1,8 @@
|
||||
# X Space Downloader
|
||||
|
||||
[](https://github.com/Dasemu/x-space-downloader/actions/workflows/tests.yml)
|
||||
[](LICENSE)
|
||||
|
||||
A Python CLI tool that downloads X (Twitter) Space recordings and renders an MP4 replay with audio and a compact participant view.
|
||||
|
||||
## Features
|
||||
@@ -35,7 +38,7 @@ sudo apt install ffmpeg
|
||||
### Install the tool
|
||||
|
||||
```bash
|
||||
git clone https://github.com/synapz-org/x-space-downloader.git
|
||||
git clone https://github.com/Dasemu/x-space-downloader.git
|
||||
cd x-space-downloader
|
||||
pip install -e .
|
||||
```
|
||||
@@ -68,6 +71,18 @@ x-space-dl --cookies cookies.txt https://x.com/i/spaces/1ZkKzZWnVRRKv
|
||||
|
||||
Cookies are also used to fetch the Space title, host, speakers, avatars, and replay chat timeline from X/Periscope metadata.
|
||||
|
||||
### Environment variables
|
||||
|
||||
Fetching metadata (required for the default video mode) needs a bearer token for X's web GraphQL API:
|
||||
|
||||
```bash
|
||||
export X_BEARER_TOKEN="<token>"
|
||||
```
|
||||
|
||||
Get this value from your own browser: open x.com while logged in, open DevTools → Network, and copy the `authorization: Bearer ...` header from any request to `x.com/i/api/graphql`. This is the public token issued to X's web client, not a personal secret, but it's not bundled with this tool — you provide your own.
|
||||
|
||||
`X_AUDIO_SPACE_QUERY_ID` can optionally override the GraphQL query ID used for `AudioSpaceById` if X changes it.
|
||||
|
||||
### Speaker timeline
|
||||
|
||||
With cookies, the tool automatically calls the replay `history` endpoint and builds participant/speaker timing from Space microphone events. If you already have speaker intervals from another extractor, you can override that with JSON:
|
||||
|
||||
Reference in New Issue
Block a user