Skip to main content

Simple Python 3 lib for downloading online HLS streams and videos

Project description


pym3u8 is simple Python 3 lib for downloading online HLS streams and videos.

You need only link to m3u8 file with list of ts-files.

pym3u8 working with direct connections and socks proxies.


Install with pip:

pip install pym3u8

Or download source or clone repository and execute:

pip3 install git+

If you have some permissions errors try this one:

sudo -H pip3 install git+

Basic usage from cli

Basic usage from command line

python3 -m pym3u8 [-h] [-u URL] [-r REFERER] [-f FILENAME] [-e EXTENSION]
              [-a USER_AGENT] [-p PROXY] [-m M3U8_EXT] [-s]

optional arguments:
  -h, --help            show this help message and exit
  -u URL, --url URL     Url of m3u8
  -r REFERER, --referer REFERER
                        Referer url
  -f FILENAME, --filename FILENAME
                        File name for downloading
  -e EXTENSION, --extension EXTENSION
                        Extension of file for downloading
  -a USER_AGENT, --user_agent USER_AGENT
                        User-agent string
  -p PROXY, --proxy PROXY
                        Proxy url
  -m M3U8_EXT, --m3u8_ext M3U8_EXT
                        Custom m3u8 extension
  -s, --ssl_verify      Verify ssl certificates


python3 -m pym3u8 -u ",720P_4000K,480P_2000K,240P_400K,_000000000.mp4.urlset/index-f1-v1-a1.m3u8" -p "socks5://"

Basic usage from macros

from pym3u8 import Loader

url = ''
referer = ''
proxy = 'socks5://'
filename = 'stream'
extension = 'ts'

loader = Loader(url, referer, proxy=proxy, filename=filename, extension=extension, user_agent=user_agent)


Python 3.6+


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

pym3u8-0.1.5.tar.gz (4.4 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page