Skip to main content

M3u8DL

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

安装

py -m pip install m3u8-dl-tool

快速开始

在终端中运行:

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.4

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.4
File Size Uploaded Provenance Actions
m3u8_dl_tool-0.1.4.tar.gz 7.9 kB Without provenance Details for m3u8_dl_tool-0.1.4.tar.gz

Built distribution (wheel)

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

Total release size: 16.8 kB

Release files / m3u8_dl_tool-0.1.4.tar.gz

Download URL m3u8_dl_tool-0.1.4.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
19c25c21803ceb25feeab99ce2816cb7cd2a308320766d25e15506879a1ee0dd
BLAKE2b-256 checksum
How to use checksums
be529d9d972247201fa11feaa9f1269efe7dbbb2b01fdf6c72a713c256bc6779
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.4-py3-none-any.whl

Download URL m3u8_dl_tool-0.1.4-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c97810a4e2bd74092e2f8c702e5c53ad24be4fa72708e2a9aae0f95e53ef77d
BLAKE2b-256 checksum
How to use checksums
0f84734d61d7310846aed6cc5a1372fb8c8e6c0bcf0a1a49065a3eff1f89e7d4
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.4

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