hm3u8dl python m3u8视频下载器
python version ≥ 3.7
3
./Downloads
positional arguments: m3u8url m3u8网络链接、本地文件链接、本地文件夹链接、txt文件内容 options: -h, --help show this help message and exit -title TITLE 视频名称 -method METHOD 解密方法 -key KEY key -iv IV iv -nonce NONCE nonce 可能用到的第二个key -enable_del ENABLE_DEL 下载完删除多余文件 -merge_mode MERGE_MODE 1:二进制合并,2:二进制合并完成后用ffmpeg转码,3:用ffmpeg转码 -base_uri BASE_URI 解析时的baseuri -threads THREADS 线程数 -headers HEADERS 请求头 -work_dir WORK_DIR 工作目录 -proxy PROXY 代理:{'http':'http://127.0.0.1:8888','https:':'https://127.0.0.1:8888'}
from hm3u8dl_cli import m3u8download m3u8url = r"C:\Users\happy\Desktop\1.txt" m3u8download(m3u8url)
"""title,m3u8url,key 1,http://hls.cntv.kcdnvip.com/asp/hls/850/0303000a/3/default/25eb64a95f094a42bbdea5b23ae756f9/850.m3u8 2,https://hls.videocc.net/4adf37ccc0/a/4adf37ccc0342e919fef2de4d02b473a_3.m3u8 """
from hm3u8dl_cli import m3u8download info = { 'm3u8url':"https://hls.videocc.net/4adf37ccc0/a/4adf37ccc0342e919fef2de4d02b473a_3.m3u8", 'title':'视频名称' } m3u8download(info)
from hm3u8dl_cli import m3u8download info1 = { 'm3u8url':"https://hls.videocc.net/4adf37ccc0/a/4adf37ccc0342e919fef2de4d02b473a_3.m3u8", 'title':'视频1', 'enable_del':False } info2 = { 'm3u8url':"https://hls.videocc.net/4adf37ccc0/a/4adf37ccc0342e919fef2de4d02b473a_2.m3u8", 'title':'视频2', 'threads':32 # 线程数32 } infos = [info1,info2] m3u8download(infos)
from hm3u8dl_cli import m3u8download info1 = { 'm3u8url':"https://***", 'title':'视频', 'method':'copyrightDRM' } m3u8download(info1)
from hm3u8dl_cli import m3u8download info1 = { 'm3u8url':"https://***", 'title':'视频', 'proxy':{'http':'http://127.0.0.1:8888','https:':'https://127.0.0.1:8888'} } m3u8download(info1)
pip install hm3u8dl_cli
hm3u8dl_cli "https://hls.videocc.net/672eabf526/c/672eabf526b94a9ea60c3e701be19ddc_1.m3u8" -title "20190213环专公开课-物理污染方向-双层壁隔声重难点解析" -key "ujIQ0DXrmywwwrGSeb/HPg=="