Skip to main content

M3u8DL

批量下载 m3u8 视频,支持过滤内容完全相同广告 TS 分片。

安装、更新

安装

py -m pip install m3u8-dl-tool

更新

pip install --upgrade m3u8_dl_tool
pip install --upgrade m3u8_dl_tool==0.1.4

快速开始

在终端中运行:

m3u8dl

JSON 示例:

[
    {
        "title": "第一集",
        "url": "https://example.com/video/index.m3u8"
    },
    {
        "title": "第二集",
        "url": "https://example.com/video/episode2.m3u8"
    }
]

查看命令帮助:m3u8dl -h 或 m3u8dl --help

m3u8dl -h

命令行选项

选项 说明
--base-dir 配置文件和输出目录,默认使用当前终端目录
--json 指定视频列表 JSON 文件;默认是 base-dir 下的 m3u8_url.json
--start-index 下载起始索引,从 0 开始,默认是 0
--end-index 下载结束索引,不包含该索引;默认下载到列表末尾
--max-workers TS 分片并发下载线程数,默认是 30
-h, --help 显示帮助信息

示例

m3u8dl --base-dir "D:\Videos" --json "series.json" --start-index 0 --end-index 5 --max-workers 10

在 Python 程序中调用

from M3u8DL import M3u8Downloader

app = M3u8Downloader(
    max_workers=10,
    base_dir=r"D:\Videos",
)

app.run()

依赖 安装包时会自动安装 Python 依赖:

  • requests
  • pycryptodome

Metadata

Release files for m3u8-dl-tool 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for m3u8-dl-tool 0.1.5
File Size Uploaded Provenance Actions
m3u8_dl_tool-0.1.5.tar.gz 10.2 kB Without provenance Details for m3u8_dl_tool-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for m3u8-dl-tool 0.1.5
File Interpreter ABI Platform Actions
m3u8_dl_tool-0.1.5-py3-none-any.whl Python 3 none any Details for m3u8_dl_tool-0.1.5-py3-none-any.whl

Total release size: 21.5 kB

Release files / m3u8_dl_tool-0.1.5.tar.gz

Download URL m3u8_dl_tool-0.1.5.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
62d963097cd1404a84885db6ce92d8b903fcd786d143a76d9644ebe3687176b7
BLAKE2b-256 checksum
How to use checksums
005de48aed94e4fe5b4aa2cc0f6826d3af05d70bf1088205e77506e64cb047e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / m3u8_dl_tool-0.1.5-py3-none-any.whl

Download URL m3u8_dl_tool-0.1.5-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f3546bf9e00f2f6e52a1ecd06c05f65f05531c41b41bb453a940253e7000e20
BLAKE2b-256 checksum
How to use checksums
6e32d5c30f3ccf494f72ae6c163256c7961b43b1b9d12f290bf2c10216ebd05f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for m3u8-dl-tool 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page