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.6.0.tar.gz
(22.4 kB
view details)
Built Distribution
m3u8-0.6.0-py3-none-any.whl
(20.8 kB
view details)
File details
Details for the file m3u8-0.6.0.tar.gz
.
File metadata
- Download URL: m3u8-0.6.0.tar.gz
- Upload date:
- Size: 22.4 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/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05823b6161b40a9ec1a6535a301c439019d2070d2a150bb7157ced3ee0aa4316 |
|
MD5 | 93b7421553ed79b133834cd860689073 |
|
BLAKE2b-256 | 6133d8fc875cd6b2e7e9af7e89b13967dbe34504fd6043b0a09f70cb299856d7 |
File details
Details for the file m3u8-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: m3u8-0.6.0-py3-none-any.whl
- Upload date:
- Size: 20.8 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/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b37ca561bcf6a16a6e6865e2f225befade3368a6679316a1a4c19c942674275e |
|
MD5 | 64dbf21da6dfcb3f0ed8134a544ed7a1 |
|
BLAKE2b-256 | 2829aa66f3347c2e9cd04462a3fc3823ddb355e6b262ed0e7c28f633813c4d9f |