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.0.tar.gz
(23.7 kB
view details)
Built Distribution
m3u8-0.7.0-py2-none-any.whl
(22.0 kB
view details)
File details
Details for the file m3u8-0.7.0.tar.gz
.
File metadata
- Download URL: m3u8-0.7.0.tar.gz
- Upload date:
- Size: 23.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 | dfaa6c9b4ed0e50234add70b3101adcf169c129c770c503d2d22a18059800c84 |
|
MD5 | acd4698cc904626915329e07bd6fd923 |
|
BLAKE2b-256 | 253f410119e66b2e6c34115d693d41908fd59405d9f1eb1ad1f932579847033c |
File details
Details for the file m3u8-0.7.0-py2-none-any.whl
.
File metadata
- Download URL: m3u8-0.7.0-py2-none-any.whl
- Upload date:
- Size: 22.0 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 | 9ae88baeb73c754561a9dfbf4fe12ade233c9b81f016fff4985ba9efbe0b2404 |
|
MD5 | 5295a31df98de3f5511a353d53e1aabc |
|
BLAKE2b-256 | 1a1f9060e611aadca9f1b95b42561dac6c1ca5de3a895b35aa96a8cbd6514046 |