简要步骤:
1.在windows上开启charles代理工具
2.在iPad上设置代理,安装charles证书,并且信任证书
3.开启ssl proxy以及,将要解密的域名加入到ssl proxying的location中
4.在iPad上点击任何一节课程,此时就可以拿到视频的地址了,一般是m3u8的播放列表。
5.有了播放地址之后就可以使用ffmpeg进行下载了,下载命令:
F:\Pycharm_Projects\m3u8_downloader\bin/ffmpeg.exe -protocol_whitelist "file,http,crypto,tcp,https,tls" -i "https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.1.m3u8?key=4120b91796e0e3f0767fe0180d1d93d2&time=1635924602" -c copy "F:\Pycharm_Projects\m3u8_downloader\download/mp4\video-ws.finger66.comp7c405955ab3b5c3e9d7.mp4"
或者使用我的m3u8downloader下载,下载命令:
m3u8_downloader.exe -p G:\Piano_jnpa -o 23.1.mp4 -i "https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.1.m3u8?key=435ed29c23835be7ff5acd2d01525d33&time=1635929148"
播放链接中有key和time字段,所以是有有效期和校验的,所以长时间之后就会失效了,最好立即下载。
m3u8_downloader.exe 新版本修复下载链接中的引号问题。
6.可以多个链接写到一个批处理中进行下载:
echo "start download" call F:\Pycharm_Projects\m3u8_downloader\venv\Scripts\activate cd /d F:\Pycharm_Projects\m3u8_downloader python m3u8_downloader.py -p G:\Piano_jnpa -o 23.1.mp4 -i "https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.1.m3u8?key=435ed29c23835be7ff5acd2d01525d33&time=1635929148" python m3u8_downloader.py -p G:\Piano_jnpa -o 23.2.mp4 -i "https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.2.m3u8?key=5d18020cb82f75f7bb03db4f730d2621&time=1635929166" echo "all done"
下载日志:
(venv) F:\Pycharm_Projects\m3u8_downloader>echo "start download" "start download" (venv) F:\Pycharm_Projects\m3u8_downloader>call F:\Pycharm_Projects\m3u8_downloader\venv\Scripts\activate **************************************************************************************************** [S] 开始下载任务...... [C] 下载链接:https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.1.m3u8?key=435ed29c23835be7ff5acd2d01525d33&time=1635929148 [C] 输出目录:G:\Piano_jnpa [C] 输出文件:23.1.mp4 [C] 创建目录: G:\Piano_jnpa [S] 开始下载...... [D] 下载文件...... [D] 文件路径:G:\Piano_jnpa\23.1.mp4 F:\Pycharm_Projects\m3u8_downloader\bin/ffmpeg.exe -protocol_whitelist "file,http,crypto,tcp,https,tls" -i "https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.1.m3u8?key=435ed29c23835be7ff5acd2d01525d33&time=1635929148" -c copy "G:\Piano_jnpa\23.1.mp4" ffmpeg version git-2020-01-26-5e62100 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9.2.1 (GCC) 20200122 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf libavutil 56. 38.100 / 56. 38.100 libavcodec 58. 67.100 / 58. 67.100 libavformat 58. 36.100 / 58. 36.100 libavdevice 58. 9.103 / 58. 9.103 libavfilter 7. 71.100 / 7. 71.100 libswscale 5. 6.100 / 5. 6.100 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 [hls @ 0000016fbf3e9c00] Skip ('#EXT-X-VERSION:3') [hls @ 0000016fbf3e9c00] Skip ('#EXT-X-ALLOW-CACHE:YES') [hls @ 0000016fbf3e9c00] Opening 'https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.1-00001.ts' for reading [hls @ 0000016fbf3e9c00] Opening 'https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.1-00002.ts' for reading Input #0, hls, from 'https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.1.m3u8?key=435ed29c23835be7ff5acd2d01525d33&time=1635929148': Duration: 00:03:04.94, start: 1.400000, bitrate: 0 kb/s Program 0 Metadata: variant_bitrate : 0 Stream #0:0: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 960x540 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Metadata: variant_bitrate : 0 Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 32000 Hz, stereo, fltp Metadata: variant_bitrate : 0 Output #0, mp4, to 'G:\Piano_jnpa\23.1.mp4': Metadata: encoder : Lavf58.36.100 Stream #0:0: Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 960x540 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc Metadata: variant_bitrate : 0 Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 32000 Hz, stereo, fltp Metadata: variant_bitrate : 0 Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [https @ 0000016fbfa94d00] Opening 'https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.1-00003.ts' for reading [https @ 0000016fbfd57240] Opening 'https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.1-00004.ts' for reading [https @ 0000016fbfa94d00] Opening 'https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.1-00005.ts' for reading [https @ 0000016fbfd57240] Opening 'https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.1-00006.ts' for reading [https @ 0000016fbfa94d00] Opening 'https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.1-00007.ts' for reading frame= 4623 fps=1524 q=-1.0 Lsize= 9806kB time=00:03:04.99 bitrate= 434.2kbits/s speed= 61x video:8294kB audio:1446kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.674605% [D] 下载完成. **************************************************************************************************** **************************************************************************************************** [S] 开始下载任务...... [C] 下载链接:https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.2.m3u8?key=5d18020cb82f75f7bb03db4f730d2621&time=1635929166 [C] 输出目录:G:\Piano_jnpa [C] 输出文件:23.2.mp4 [C] 创建目录: G:\Piano_jnpa [S] 开始下载...... [D] 下载文件...... [D] 文件路径:G:\Piano_jnpa\23.2.mp4 F:\Pycharm_Projects\m3u8_downloader\bin/ffmpeg.exe -protocol_whitelist "file,http,crypto,tcp,https,tls" -i "https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.2.m3u8?key=5d18020cb82f75f7bb03db4f730d2621&time=1635929166" -c copy "G:\Piano_jnpa\23.2.mp4" ffmpeg version git-2020-01-26-5e62100 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9.2.1 (GCC) 20200122 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf libavutil 56. 38.100 / 56. 38.100 libavcodec 58. 67.100 / 58. 67.100 libavformat 58. 36.100 / 58. 36.100 libavdevice 58. 9.103 / 58. 9.103 libavfilter 7. 71.100 / 7. 71.100 libswscale 5. 6.100 / 5. 6.100 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 [hls @ 000001d24d309c00] Skip ('#EXT-X-VERSION:3') [hls @ 000001d24d309c00] Skip ('#EXT-X-ALLOW-CACHE:YES') [hls @ 000001d24d309c00] Opening 'https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.2-00001.ts' for reading [hls @ 000001d24d309c00] Opening 'https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.2-00002.ts' for reading Input #0, hls, from 'https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.2.m3u8?key=5d18020cb82f75f7bb03db4f730d2621&time=1635929166': Duration: 00:03:56.70, start: 1.400000, bitrate: 0 kb/s Program 0 Metadata: variant_bitrate : 0 Stream #0:0: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 960x540 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Metadata: variant_bitrate : 0 Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 32000 Hz, stereo, fltp Metadata: variant_bitrate : 0 Output #0, mp4, to 'G:\Piano_jnpa\23.2.mp4': Metadata: encoder : Lavf58.36.100 Stream #0:0: Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 960x540 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc Metadata: variant_bitrate : 0 Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 32000 Hz, stereo, fltp Metadata: variant_bitrate : 0 Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [https @ 000001d24d684d00] Opening 'https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.2-00003.ts' for reading [https @ 000001d24d8a82c0] Opening 'https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.2-00004.ts' for reading [https @ 000001d24d684d00] Opening 'https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.2-00005.ts' for reading [https @ 000001d24d8a82c0] Opening 'https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.2-00006.ts' for reading [https @ 000001d24d684d00] Opening 'https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.2-00007.ts' for reading [https @ 000001d24d8a82c0] Opening 'https://video-ws.finger66.com/prod/course/video/PRO_JNPA_CO_23.2-00008.ts' for reading frame= 5917 fps=1630 q=-1.0 Lsize= 7235kB time=00:03:56.76 bitrate= 250.3kbits/s speed=65.2x video:5301kB audio:1850kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.170481% [D] 下载完成. **************************************************************************************************** "all done"
m3u8_downloader下载链接:
https://obaby.lanzoui.com/iROTMw21wmj
文件哈希:
名称: m3u8_downloader_21_11_02.rar
大小: 24575951 字节 (23 MiB)
SHA256: 3C88E3B62F3FB5ADE1F6C1185342A954F113FAB8CC3169A6CE82B24E61B5AA8F
1 comment
更新文件链接:https://obaby.lanzoui.com/in9MYwx7cgf
校验:
md5 /Users/zhongming/Downloads/m3u8_downloader_21_11_02\[win\].zip
MD5 (/Users/zhongming/Downloads/m3u8_downloader_21_11_02[win].zip) = 0fe20834f8c2067010d2a27483196494
此处为完整压缩包。文章中的压缩包不包含ffmpeg,需要下载后放入bin/目录下。