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.7.1.tar.gz
(23.8 kB
view details)
Built Distribution
m3u8-0.7.1-py2-none-any.whl
(22.1 kB
view details)
File details
Details for the file m3u8-0.7.1.tar.gz
.
File metadata
- Download URL: m3u8-0.7.1.tar.gz
- Upload date:
- Size: 23.8 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 | f9d7c1d0da802861a0cb651a59b617e49b5800e7efac9bd88591635f90c0a112 |
|
MD5 | 3dab272269174caa0f72681c929b65e2 |
|
BLAKE2b-256 | 9f2e1e89eed1fbd2d5dca9e50aedd8ca3b94f0572976dac8b2b3b45e2c587bb6 |
File details
Details for the file m3u8-0.7.1-py2-none-any.whl
.
File metadata
- Download URL: m3u8-0.7.1-py2-none-any.whl
- Upload date:
- Size: 22.1 kB
- Tags: Python 2
- 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 | 1ccdcd6d07205ebd384ecd0162297d1dbadab0c1663347cb87de3e2f04725fe9 |
|
MD5 | ea21b37429602a220100dd28f88a12ce |
|
BLAKE2b-256 | 5188e3413fac44baf1402aeeda6f06484bf28b61ec6bf87b4e7116358992d592 |