Python m3u8 parser
Project description
m3u8
Python m3u8 parser.
Documentation
Loading a playlist
To load a playlist into an object from uri, file path or directly from string, use the load/loads functions:
import m3u8
playlist = m3u8.load('http://videoserver.com/playlist.m3u8') # this could also be an absolute filename
print(playlist.segments)
print(playlist.target_duration)
# if you already have the content as string, use
playlist = m3u8.loads('#EXTM3U8 ... etc ... ')
Dumping a playlist
To dump a playlist from an object to the console or a file, use the dump/dumps functions:
import m3u8
playlist = m3u8.load('http://videoserver.com/playlist.m3u8')
print(playlist.dumps())
# if you want to write a file from its content
playlist.dump('playlist.m3u8')
Running Tests
$ ./runtests
Contributing
All contribution is welcome, but we will merge a pull request if, and only if, it
has tests
follows the code conventions
If you plan to implement a new feature or something that will take more than a few minutes, please open an issue to make sure we don’t work on the same thing.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
m3u8-0.8.0.tar.gz
(24.7 kB
view details)
Built Distribution
m3u8-0.8.0-py3-none-any.whl
(22.2 kB
view details)
File details
Details for the file m3u8-0.8.0.tar.gz
.
File metadata
- Download URL: m3u8-0.8.0.tar.gz
- Upload date:
- Size: 24.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b598ee0c8f786d3646d19ad2617aacea8406b43b75ed315851a4230d6b922b55 |
|
MD5 | 4f1ad07c64fbdb7e3ac8d5f269887131 |
|
BLAKE2b-256 | 48357ddca9fc6932b30f8cebbc53e57e8554efc04ffa678c8381b4798141efd7 |
File details
Details for the file m3u8-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: m3u8-0.8.0-py3-none-any.whl
- Upload date:
- Size: 22.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba3b4d4eef03a3be94b120fb5d53334d43805b5968ca6097f76d8a738684be4b |
|
MD5 | 30bb1b4d5f3aa8e4198ad95204bc10c8 |
|
BLAKE2b-256 | aa034428b9e575e024f6840ac523b740d60d96a85402dc889cfcece01150d92d |