beacon-snatch


Namebeacon-snatch JSON
Version 0.1.4 PyPI version JSON
download
home_pagehttps://github.com/retrozelda/beacon-snatch
SummarySnatch from Beacon
upload_time2024-08-24 06:34:04
maintainerNone
docs_urlNone
authorRetroZelda
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Beacon Snatch

Beacon Snatch is a 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.

It is also a python library for more advanced usage.

## 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`:

```bash
git clone https://github.com/retrozelda/beacon_snatch.git
cd beacon_snatch
pip install .
```
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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/retrozelda/beacon-snatch",
    "name": "beacon-snatch",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "RetroZelda",
    "author_email": "retrozelda@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ea/f3/6561f76fa8d900d1ac158017e182ce0a2399dc36bc4106566012537c569d/beacon_snatch-0.1.4.tar.gz",
    "platform": null,
    "description": "# Beacon Snatch\n\nBeacon Snatch is a 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.\n\nIt is also a python library for more advanced usage.\n\n## Features\n\n- **Authentication**: Authenticate with your Beacon account using email and password or saved cookies.\n- **Series Management**: List available series, fetch series details, and download all content from a series.\n- **Content Management**: Fetch content details, display available streams, and download specific content by ID.\n- **Interactive Mode**: A user-friendly interactive command shell for managing your content downloads.\n- **Output and Cache Management**: Set the directory where downloaded files are saved and manage cached cookies for session persistence.\n\n## Installation\n\nTo install Beacon Snatch, first clone the repository and then install it using `pip`:\n\n```bash\ngit clone https://github.com/retrozelda/beacon_snatch.git\ncd beacon_snatch\npip install .\n```\nThis will install the required dependencies listed in the dependencies file and make the CLI accessible via the `beacon-snatch` command.\n\n## CLI Usage\nYou can run Beacon Snatch either in interactive mode or by directly executing commands.\n\nCommand-Line Mode\nRun any of the following commands directly from the terminal:\n```\n# Authenticate with your Beacon account\nbeacon-snatch authenticate\n\n# List all available series\nbeacon-snatch list-series\n\n# Get detailed information about a specific series\nbeacon-snatch series-info <series_id>\n\n# List content in a specific series\nbeacon-snatch series-list-content <series_id>\n\n# Download all content from a specific series\nbeacon-snatch series-download <series_id>\n\n# Get detailed information about specific content\nbeacon-snatch content-info <content_id>\n\n# Download specific content by content ID\nbeacon-snatch content-download <content_id>\n\n# Set the output directory where downloaded files will be saved\nbeacon-snatch set-output <output_dir>\n\n# Clear the stored authentication cookies\nbeacon-snatch clear-cookies\n\n# View configuration info for the current session\nbeacon-snatch info\n\n# Exit the CLI\nbeacon-snatch exit\n```\n\n### Interactive Mode\nStart the interactive mode for easier use:\n\n```\nbeacon-snatch interactive\n```\nIn interactive mode, you can type any of the above commands without the need to prefix them with beacon-snatch.\n\n#### Example Interactive Session:\n```\n(Beacon) > authenticate\nEnter your Beacon Email: your-email@example.com\nEnter your Beacon Password:\nAuthenticated as: your-username\n\n(Beacon) > list-series\n0) series-1\n1) series-2\n2) series-3\n\n(Beacon) > series-info series-1\n\tid:\n\t\t123\n\ttitle:\n\t\tExample Series Title\n\tdescription:\n\t\tThis is an example series description.\n\tseries_url:\n\t\thttps://beacon.tv/series/series-1\n\tcontent count:\n\t\t10\n\n(Beacon) > exit\nGoodbye!\n```\n### Configuration Options\nWhen starting the CLI, you can set the following options:\n\n- **--log-level [DEBUG|VERBOSE|INFO|WARNING|ERROR|CRITICAL]**: Set the logging level.\n- **--cache <cache_dir>**: Path to the cache directory. If not provided, a default will be used.\n- **--output <output_dir>**: Path to save downloads. If not provided, a default will be used.\n\n#### Example usage:\n```\nbeacon-snatch --log-level INFO --cache ~/.beacon_cache --output ~/downloads authenticate\n```\n\n## Python Library Usage\nYou 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:\n\n### Example Usage\n```\nfrom beacon_snatch import BeaconAuthentication, BeaconSeries, BeaconContent\n\n# Authenticate with your Beacon account\nauth = BeaconAuthentication(email=\"your-email@example.com\", password=\"your-password\")\nauth.authenticate()\n\n# List available series\nseries_ids = BeaconSeries.get_all_series(auth)\nprint(series_ids)\n\n# Get detailed information about a specific series\nseries = BeaconSeries.create(auth, \"series_id\")\nprint(f\"Title: {series.title}\")\nprint(f\"Description: {series.description}\")\n\n# Fetch and list content in the series\nseries.fetch(auth)\nfor content in series.content:\n    print(f\"Content Title: {content.title}\")\n\n# Download a specific content\ncontent = BeaconContent.create(auth, \"content_id\")\nif content:\n    stream = content.video_and_audio_streams[0]  # Selects the highest resolution stream\n    content.download(stream, destination_folder=\"./downloads\")\n```\n\n#### Available Classes\n- **BeaconAuthentication**: Handles authentication and session management.\n- **BeaconSeries**: Manages series data and content fetching.\n- **BeaconContent**: Manages individual content items and downloading.\n- **BeaconStreamInfo**: Represents available streams for a content item (e.g., video, audio, etc).\n\n# Dependencies\nThe project relies on several Python libraries, including:\n\n- selenium\n- requests\n- progressbar2\n- m3u8\n- click\n\nThese are automatically installed when you install the project using pip.\n\n# License\nThis project is licensed under the MIT License.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Snatch from Beacon",
    "version": "0.1.4",
    "project_urls": {
        "Homepage": "https://github.com/retrozelda/beacon-snatch"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7ae9321780e73d5c6e9ea86970705cc85a0ad3a1d1007cab49256ff1e1b9a2c7",
                "md5": "bcdef40872c7ad4cf4fea6d1f8555d53",
                "sha256": "16b12bd82f07b76bfd66ab48228cbf1145fd29d18eae2c889f2f44cb8a9037fd"
            },
            "downloads": -1,
            "filename": "beacon_snatch-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bcdef40872c7ad4cf4fea6d1f8555d53",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 15383,
            "upload_time": "2024-08-24T06:34:03",
            "upload_time_iso_8601": "2024-08-24T06:34:03.372595Z",
            "url": "https://files.pythonhosted.org/packages/7a/e9/321780e73d5c6e9ea86970705cc85a0ad3a1d1007cab49256ff1e1b9a2c7/beacon_snatch-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eaf36561f76fa8d900d1ac158017e182ce0a2399dc36bc4106566012537c569d",
                "md5": "842fc89e3a40a660e0a318c23998beea",
                "sha256": "3be649e35333d317019e25939e4464d9375193f8a7d5d57c9458a1dbe673afda"
            },
            "downloads": -1,
            "filename": "beacon_snatch-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "842fc89e3a40a660e0a318c23998beea",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 14978,
            "upload_time": "2024-08-24T06:34:04",
            "upload_time_iso_8601": "2024-08-24T06:34:04.945062Z",
            "url": "https://files.pythonhosted.org/packages/ea/f3/6561f76fa8d900d1ac158017e182ce0a2399dc36bc4106566012537c569d/beacon_snatch-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-24 06:34:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "retrozelda",
    "github_project": "beacon-snatch",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "beacon-snatch"
}
        
Elapsed time: 0.78490s