Skip to main content

Beacon Snatch

Beacon Snatch is a library and command-line interface (CLI) tool designed to authenticate, browse, and download video content from the Beacon streaming platform. The CLI offers both direct command execution and an interactive mode for ease of use.

Beacon Snatch is a project made quickly that uses a headless browser to obtain the video streams to download, so dont expect anything fast or secure. Use at your own risk.

Features

  • Authentication: Authenticate with your Beacon account using email and password or saved cookies.
  • Series Management: List available series, fetch series details, and download all content from a series.
  • Content Management: Fetch content details, display available streams, and download specific content by ID.
  • Interactive Mode: A user-friendly interactive command shell for managing your content downloads.
  • Output and Cache Management: Set the directory where downloaded files are saved and manage cached cookies for session persistence.

Installation

To install Beacon Snatch, first clone the repository and then install it using pip:

git clone https://github.com/retrozelda/beacon-snatch.git
cd beacon-snatch
pip install .

or simply

pip install beacon-snatch

This will install the required dependencies listed in the dependencies file and make the CLI accessible via the beacon-snatch command.

CLI Usage

You can run Beacon Snatch either in interactive mode or by directly executing commands.

Command-Line Mode Run any of the following commands directly from the terminal:

# Authenticate with your Beacon account
beacon-snatch authenticate

# List all available series
beacon-snatch list-series

# Get detailed information about a specific series
beacon-snatch series-info <series_id>

# List content in a specific series
beacon-snatch series-list-content <series_id>

# Download all content from a specific series
beacon-snatch series-download <series_id>

# Get detailed information about specific content
beacon-snatch content-info <content_id>

# Download specific content by content ID
beacon-snatch content-download <content_id>

# Set the output directory where downloaded files will be saved
beacon-snatch set-output <output_dir>

# Clear the stored authentication cookies
beacon-snatch clear-cookies

# View configuration info for the current session
beacon-snatch info

# Exit the CLI
beacon-snatch exit

Interactive Mode

Start the interactive mode for easier use:

beacon-snatch interactive

In interactive mode, you can type any of the above commands without the need to prefix them with beacon-snatch.

Example Interactive Session:

(Beacon) > authenticate
Enter your Beacon Email: your-email@example.com
Enter your Beacon Password:
Authenticated as: your-username

(Beacon) > list-series
0) series-1
1) series-2
2) series-3

(Beacon) > series-info series-1
	id:
		123
	title:
		Example Series Title
	description:
		This is an example series description.
	series_url:
		https://beacon.tv/series/series-1
	content count:
		10

(Beacon) > exit
Goodbye!

Configuration Options

When starting the CLI, you can set the following options:

  • --log-level [DEBUG|VERBOSE|INFO|WARNING|ERROR|CRITICAL]: Set the logging level.
  • --cache <cache_dir>: Path to the cache directory. If not provided, a default will be used.
  • --output <output_dir>: Path to save downloads. If not provided, a default will be used.

Example usage:

beacon-snatch --log-level INFO --cache ~/.beacon_cache --output ~/downloads authenticate

Python Library Usage

You can also use Beacon Snatch as a Python library to integrate its functionality into your own applications. Here's an example of how to use the library:

Example Usage

from beacon_snatch import BeaconAuthentication, BeaconSeries, BeaconContent

# Authenticate with your Beacon account
auth = BeaconAuthentication(email="your-email@example.com", password="your-password")
auth.authenticate()

# List available series
series_ids = BeaconSeries.get_all_series(auth)
print(series_ids)

# Get detailed information about a specific series
series = BeaconSeries.create(auth, "series_id")
print(f"Title: {series.title}")
print(f"Description: {series.description}")

# Fetch and list content in the series
series.fetch(auth)
for content in series.content:
    print(f"Content Title: {content.title}")

# Download a specific content
content = BeaconContent.create(auth, "content_id")
if content:
    stream = content.video_and_audio_streams[0]  # Selects the highest resolution stream
    content.download(stream, destination_folder="./downloads")

Available Classes

  • BeaconAuthentication: Handles authentication and session management.
  • BeaconSeries: Manages series data and content fetching.
  • BeaconContent: Manages individual content items and downloading.
  • BeaconStreamInfo: Represents available streams for a content item (e.g., video, audio, etc).

Dependencies

The project relies on several Python libraries, including:

  • selenium
  • requests
  • progressbar2
  • m3u8
  • click

These are automatically installed when you install the project using pip.

License

This project is licensed under the MIT License.

Metadata

Release files for beacon-snatch 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beacon-snatch 0.1.8
File Size Uploaded Provenance
beacon_snatch-0.1.8.tar.gz 16.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for beacon-snatch 0.1.8
File Interpreter ABI Platform
beacon_snatch-0.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 34.7 kB

Release files / beacon_snatch-0.1.8.tar.gz

Download URL beacon_snatch-0.1.8.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
01d0fa5547577e272fb0068214af26a742a2c04e7997f44a6f94efcfb5245777
BLAKE2b-256 checksum
How to use checksums
7ae5922cab2875d73c6ceda3609457fe81d68108934e1473e18478460d82d324
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / beacon_snatch-0.1.8-py3-none-any.whl

Download URL beacon_snatch-0.1.8-py3-none-any.whl
Size 18.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
21234aae8537a08551b8097d685ccc2d23461546187d9de0a7b2e6c15140fe29
BLAKE2b-256 checksum
How to use checksums
87ed0497dd77da2a2be0131f1ddca80013385f3d64be74adfc611101704fa84b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for beacon-snatch 0.1.8

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page