pym3u8downloader


Namepym3u8downloader JSON
Version 0.1.8 PyPI version JSON
download
home_pagehttps://github.com/coldsofttech/pym3u8downloader
SummaryM3U8 Downloader is a Python class designed to download and concatenate video files from M3U8 playlists.
upload_time2024-09-01 18:14:41
maintainerNone
docs_urlNone
authorcoldsofttech
requires_pythonNone
licenseMIT
keywords m3u8-playlist m3u8 m3u8-downloader
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # `pym3u8downloader`

M3U8 Downloader is a Python class designed to download and concatenate video files from M3U8 playlists, including master
playlists. This class offers comprehensive functionality for managing M3U8 playlist files, downloading video segments,
optionally combining them into a single video file, and handling various error conditions.

## Installation

M3U8Downloader can be installed using pip:

```bash
pip install pym3u8downloader
```

## Usage

````python
from pym3u8downloader import M3U8Downloader

# Initialize the downloader
downloader = M3U8Downloader(
    input_file_path="http://example.com/video.m3u8",
    output_file_path="output_video"
)

# Download and concatenate the playlist
downloader.download_playlist()

# Download and concatenate the master playlist
downloader.download_master_playlist(name='720')

# Output
# Verify  : [##################################################] 100%
# Download: [##################################################] 100%
# Build   : [##################################################] 100%
````

# Documentation

## `pym3u8downloader`

### `M3U8Downloader`

#### Constructors

- `M3U8Downloader(input_file_path: str, output_file_path: str, skip_space_check: Optional[bool] = False, debug: Optional[bool] = False, debug_file_path: Optional[str] = 'debug.log', max_threads: Optional[int] = 10, verify_ssl: Optional[bool] = True)`:
  Initializes the M3U8Downloader object with the specified parameters.

#### Methods

- `download_playlist(merge: bool = True)`: Downloads video files from an M3U8 playlist. The optional `merge`
  parameter determines the handling of the downloaded segments. When `merge` is set to `True`, the method downloads and
  concatenates all video segments into a single output file. If `merge` is `False`, it only downloads the segments
  without concatenating them, keeping each segment as an individual file.
- `download_master_playlist(name: Optional[str] = None, bandwidth: Optional[str] = None, resolution: Optional[str] = None, merge: bool = True)`:
  Downloads video files from an M3U8 master playlist, with the specific variant selected based on optional parameters
  such as `name`, `bandwidth`, and `resolution`. The optional `merge` parameter determines the handling of the
  downloaded segments. When `merge` is set to `True`, the method downloads and concatenates all video segments into a
  single output file. If `merge` is `False`, it only downloads the segments without concatenating them, keeping each
  segment as an individual file.

#### Properties

- `input_file_path`: Getter/setter property for the input file path.
- `output_file_path`: Getter/setter property for the output file path.
- `skip_space_check`: Getter/setter property for the skip space check flag.
- `debug`: Getter/setter property for the debug flag.
- `debug_file_path`: Getter/setter property for the debug file path.
- `max_threads`: Getter/setter property for the maximum number of threads that can be executed in parallel.
- `is_download_complete`: Getter property for the download completion status.
- `verify_ssl`: Getter/setter property for the verify SSL flag. This helps skip SSL warnings for HTTPS-based URLs.
  Defaults to True.

### `M3U8DownloaderError`

This error class is employed to signal any issues or errors encountered during the execution of `M3U8Downloader`
methods.

#### Constructors

- `M3U8DownloaderError(message: str)`: Initialize a M3U8DownloaderError.

### `M3U8DownloaderWarning`

This warning class is employed to signal any issues encountered during the execution of the `download_master_playlist`
method of the `M3U8Downloader` class, especially when no parameters are passed. Along with the warning message,
the `json_data` variable is returned with all available resolution formats (variants) in JSON-structured format.

#### Constructors

- `M3U8DownloaderWarning(message: str, json_data: Optional[list] = None)`: Initialize a M3U8DownloaderWarning.

# Troubleshooting Guide

For detailed troubleshooting guide, please refer to [TROUBLESHOOTING](TROUBLESHOOTING.md).

# License

Please refer to the [MIT License](LICENSE) within the project for more information.

# Contributing

We welcome contributions from the community! Whether you have ideas for new features, bug fixes, or enhancements, feel
free to open an issue or submit a pull request on [GitHub](https://github.com/coldsofttech/pym3u8downloader).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/coldsofttech/pym3u8downloader",
    "name": "pym3u8downloader",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "m3u8-playlist, m3u8, m3u8-downloader",
    "author": "coldsofttech",
    "author_email": null,
    "download_url": null,
    "platform": null,
    "description": "# `pym3u8downloader`\n\nM3U8 Downloader is a Python class designed to download and concatenate video files from M3U8 playlists, including master\nplaylists. This class offers comprehensive functionality for managing M3U8 playlist files, downloading video segments,\noptionally combining them into a single video file, and handling various error conditions.\n\n## Installation\n\nM3U8Downloader can be installed using pip:\n\n```bash\npip install pym3u8downloader\n```\n\n## Usage\n\n````python\nfrom pym3u8downloader import M3U8Downloader\n\n# Initialize the downloader\ndownloader = M3U8Downloader(\n    input_file_path=\"http://example.com/video.m3u8\",\n    output_file_path=\"output_video\"\n)\n\n# Download and concatenate the playlist\ndownloader.download_playlist()\n\n# Download and concatenate the master playlist\ndownloader.download_master_playlist(name='720')\n\n# Output\n# Verify  : [##################################################] 100%\n# Download: [##################################################] 100%\n# Build   : [##################################################] 100%\n````\n\n# Documentation\n\n## `pym3u8downloader`\n\n### `M3U8Downloader`\n\n#### Constructors\n\n- `M3U8Downloader(input_file_path: str, output_file_path: str, skip_space_check: Optional[bool] = False, debug: Optional[bool] = False, debug_file_path: Optional[str] = 'debug.log', max_threads: Optional[int] = 10, verify_ssl: Optional[bool] = True)`:\n  Initializes the M3U8Downloader object with the specified parameters.\n\n#### Methods\n\n- `download_playlist(merge: bool = True)`: Downloads video files from an M3U8 playlist. The optional `merge`\n  parameter determines the handling of the downloaded segments. When `merge` is set to `True`, the method downloads and\n  concatenates all video segments into a single output file. If `merge` is `False`, it only downloads the segments\n  without concatenating them, keeping each segment as an individual file.\n- `download_master_playlist(name: Optional[str] = None, bandwidth: Optional[str] = None, resolution: Optional[str] = None, merge: bool = True)`:\n  Downloads video files from an M3U8 master playlist, with the specific variant selected based on optional parameters\n  such as `name`, `bandwidth`, and `resolution`. The optional `merge` parameter determines the handling of the\n  downloaded segments. When `merge` is set to `True`, the method downloads and concatenates all video segments into a\n  single output file. If `merge` is `False`, it only downloads the segments without concatenating them, keeping each\n  segment as an individual file.\n\n#### Properties\n\n- `input_file_path`: Getter/setter property for the input file path.\n- `output_file_path`: Getter/setter property for the output file path.\n- `skip_space_check`: Getter/setter property for the skip space check flag.\n- `debug`: Getter/setter property for the debug flag.\n- `debug_file_path`: Getter/setter property for the debug file path.\n- `max_threads`: Getter/setter property for the maximum number of threads that can be executed in parallel.\n- `is_download_complete`: Getter property for the download completion status.\n- `verify_ssl`: Getter/setter property for the verify SSL flag. This helps skip SSL warnings for HTTPS-based URLs.\n  Defaults to True.\n\n### `M3U8DownloaderError`\n\nThis error class is employed to signal any issues or errors encountered during the execution of `M3U8Downloader`\nmethods.\n\n#### Constructors\n\n- `M3U8DownloaderError(message: str)`: Initialize a M3U8DownloaderError.\n\n### `M3U8DownloaderWarning`\n\nThis warning class is employed to signal any issues encountered during the execution of the `download_master_playlist`\nmethod of the `M3U8Downloader` class, especially when no parameters are passed. Along with the warning message,\nthe `json_data` variable is returned with all available resolution formats (variants) in JSON-structured format.\n\n#### Constructors\n\n- `M3U8DownloaderWarning(message: str, json_data: Optional[list] = None)`: Initialize a M3U8DownloaderWarning.\n\n# Troubleshooting Guide\n\nFor detailed troubleshooting guide, please refer to [TROUBLESHOOTING](TROUBLESHOOTING.md).\n\n# License\n\nPlease refer to the [MIT License](LICENSE) within the project for more information.\n\n# Contributing\n\nWe welcome contributions from the community! Whether you have ideas for new features, bug fixes, or enhancements, feel\nfree to open an issue or submit a pull request on [GitHub](https://github.com/coldsofttech/pym3u8downloader).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "M3U8 Downloader is a Python class designed to download and concatenate video files from M3U8 playlists.",
    "version": "0.1.8",
    "project_urls": {
        "Homepage": "https://github.com/coldsofttech/pym3u8downloader"
    },
    "split_keywords": [
        "m3u8-playlist",
        " m3u8",
        " m3u8-downloader"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1b1cdd89b3b49d552cadb8de5a406d2272722e1c5c90bac056c5dc1ec14847c4",
                "md5": "88f6529d75a357fbe22233a003adb616",
                "sha256": "29469ae682a0fe32af2ad8862148dc04d8a21fad7796749338bc01c7ded26cf3"
            },
            "downloads": -1,
            "filename": "pym3u8downloader-0.1.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "88f6529d75a357fbe22233a003adb616",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 13847,
            "upload_time": "2024-09-01T18:14:41",
            "upload_time_iso_8601": "2024-09-01T18:14:41.860617Z",
            "url": "https://files.pythonhosted.org/packages/1b/1c/dd89b3b49d552cadb8de5a406d2272722e1c5c90bac056c5dc1ec14847c4/pym3u8downloader-0.1.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-01 18:14:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "coldsofttech",
    "github_project": "pym3u8downloader",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "pym3u8downloader"
}
        
Elapsed time: 0.29949s