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.10.0.tar.gz
(24.4 kB
view details)
Built Distribution
m3u8-0.10.0-py3-none-any.whl
(22.8 kB
view details)
File details
Details for the file m3u8-0.10.0.tar.gz
.
File metadata
- Download URL: m3u8-0.10.0.tar.gz
- Upload date:
- Size: 24.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/2.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d4ce38cbb3bc3358bda48c8d05b1f8dab88252c3df7c70c1dcd54b40d4f0b06 |
|
MD5 | 7c26f443a9d92b7e474f5fb95ee8adf6 |
|
BLAKE2b-256 | 95af6920ce77c3f86c9df43a194dcc1b830f12de0774166fe0b6fcaa0e70ca58 |
File details
Details for the file m3u8-0.10.0-py3-none-any.whl
.
File metadata
- Download URL: m3u8-0.10.0-py3-none-any.whl
- Upload date:
- Size: 22.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/2.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0b7855009ab3761ece1d0fa49d06cb908a5dbb8b77a7b37f678c6df1cc7a230 |
|
MD5 | e021a278cee14acc5eabbc69284b4ddb |
|
BLAKE2b-256 | 5d17785bd51fdef3af703e7e5d88cab1675bf92d3b133201f0033793ab3eaf48 |