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.9.0.tar.gz
(24.7 kB
view details)
Built Distribution
m3u8-0.9.0-py3-none-any.whl
(22.2 kB
view details)
File details
Details for the file m3u8-0.9.0.tar.gz
.
File metadata
- Download URL: m3u8-0.9.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 | 3ee058855c430dc364db6b8026269d2b4c1894b198bcc5c824039c551c05f497 |
|
MD5 | 48b031635d21f6e10054eee1e4bbd92a |
|
BLAKE2b-256 | f41f6370b6c5ba1975f5299bdda0e953e381880accbad1d2daa8fb0da3548051 |
File details
Details for the file m3u8-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: m3u8-0.9.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 | 7dde0a20cf985422593810006dd371a1e3e7afd33a76277111eba3f220288902 |
|
MD5 | dade7c423382d2e445566d0d639d33b2 |
|
BLAKE2b-256 | d21db8bdd7361ff8bde2169bcdb82362ccf62638dffca1360a8f4e9ff76d240f |