Skip to main content

Download Twitter Space

Project description

space_dl

Python library/app to download twitter spaces and make multiple output from them This downloads a Twitter space as separated file m3u8 playlist, then it can convert all into a single chapterized m4a audio file

The M4A audio file is Chapterized so if you use a player with media chapter support(like mpv or vlc) you can switch between speakers

features

  • Download Twitter space
  • Merge files into one m4a file
  • Chapterize m4a file, so we know when each user speaks and can switch between them
  • Make mp4 video of Space with avatars and waveform spectrum effect (#TODO)

Installation

FFMPEG

First install ffmpeg; on Debian based linux distros you can do:

sudo apt-get install ffmpeg

For other OS refer to FFMPEG documents

Via pypi.org

pip install space_dl

Via git

pip install https://github.com/RYNEQ/space_dl

Usage

As an application

python3 -m space_dl [-a AUDIO_FILE] [-d OUT_DIR] [-p PROXY] [-v] URL

As a library

import space_dl
s = space_dl.Space.from_url(url, out_dir, verbose=True, proxies=...)
print(f"Playlist saved as {s.playlist_file_path}")
s.merge_into_m4a(audio_file_path)
print(f"Audio file saved as {audio_file_path}")

Options

  -a/--audio-file AUDIO_FILE: If passed the playlist will be converted to a chapterized m4a audio file
  -d/--out-dir OUT_DIR: Set output directory
  -p/--proxy PROXY: Use proxy (http,socks4,socks5,socks5h)
                    Use socks5h to pass the DNS queries via proxy
  -v/--verbose: Verbose Mode

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

space_dl-0.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

space_dl-0.1.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file space_dl-0.1.0.tar.gz.

File metadata

  • Download URL: space_dl-0.1.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for space_dl-0.1.0.tar.gz
Algorithm Hash digest
SHA256 47f639793ed0dba8fc1adcbbaccfeb6cdb30cee0b46b298e00b952d00c246e4f
MD5 e5b5b80062832f47f79616ca5f2561ea
BLAKE2b-256 c7e76cefa7f044cf0612852472328dc47abc691eab9fd6850b891440347e2319

See more details on using hashes here.

File details

Details for the file space_dl-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: space_dl-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for space_dl-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e9619f07dfbbc201aff7830f175838a40c072bef7b4d4fae4bd14b9f45f83e4
MD5 9ddeaac9a93de4f072d9df3a19fb0248
BLAKE2b-256 225146b726b4c1a5c3e00d66471aa03153675b4de20f106cb80167cca9d16f7f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page