Skip to main content

Python m3u8 parser

Project description

image image

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')

Supported tags

Frequently Asked Questions

Running Tests

$ ./runtests

Contributing

All contributions are 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

m3u8-5.0.0.tar.gz (41.3 kB view details)

Uploaded Source

Built Distribution

m3u8-5.0.0-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file m3u8-5.0.0.tar.gz.

File metadata

  • Download URL: m3u8-5.0.0.tar.gz
  • Upload date:
  • Size: 41.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/41.2.0 requests-toolbelt/0.10.1 tqdm/4.64.1 CPython/2.7.18

File hashes

Hashes for m3u8-5.0.0.tar.gz
Algorithm Hash digest
SHA256 33f795fe9e31074537e52b52c75f5b04a1741db686aba2b06b4ff4664c27f0a4
MD5 54d35160af2c17c825c3f2eaa33d7fa9
BLAKE2b-256 8e305c68c06b042208d0386faa13593ea96bc5ca1c2b7a0a6f95be6a41efd44f

See more details on using hashes here.

File details

Details for the file m3u8-5.0.0-py3-none-any.whl.

File metadata

  • Download URL: m3u8-5.0.0-py3-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/41.2.0 requests-toolbelt/0.10.1 tqdm/4.64.1 CPython/2.7.18

File hashes

Hashes for m3u8-5.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20805a4b8ec3be573fa6441ba81657ba33c4b17283b7d22313a7b401e7e70eed
MD5 613a53858c3037b210d465738c2a09a6
BLAKE2b-256 16107812f82cbb7dd4a08e68e5bc4c352657f3e8dfed80d3d267b5586ebfbcd0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page