You've already forked N_m3u8DL-CLI
mirror of
https://github.com/nilaoda/N_m3u8DL-CLI
synced 2025-09-10 12:40:52 +02:00
Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a6c7c0fd8c | ||
![]() |
bd6df6b58c | ||
![]() |
e0a9071d62 | ||
![]() |
5c9bcf72d2 | ||
![]() |
7cf2c12d0c | ||
![]() |
1b35fe2d2c | ||
![]() |
ed3aae1cb9 | ||
![]() |
01c2ecbeb5 | ||
![]() |
9993ec8177 | ||
![]() |
464300c860 | ||
![]() |
45fa58a46f | ||
![]() |
f93ddc7107 | ||
![]() |
05f450fa6d |
@@ -1,12 +1,10 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27703.2000
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29215.179
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "N_m3u8DL-CLI", "N_m3u8DL-CLI\N_m3u8DL-CLI.csproj", "{4FB61439-B738-46AC-B3AF-2BF72150D057}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GUI-MainWindow", "GUI-MainWindow\GUI-MainWindow.csproj", "{FE91DB43-1F1F-4119-B808-A7F4795BB4D0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -17,10 +15,6 @@ Global
|
||||
{4FB61439-B738-46AC-B3AF-2BF72150D057}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4FB61439-B738-46AC-B3AF-2BF72150D057}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4FB61439-B738-46AC-B3AF-2BF72150D057}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FE91DB43-1F1F-4119-B808-A7F4795BB4D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FE91DB43-1F1F-4119-B808-A7F4795BB4D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FE91DB43-1F1F-4119-B808-A7F4795BB4D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FE91DB43-1F1F-4119-B808-A7F4795BB4D0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@@ -410,7 +410,7 @@ namespace N_m3u8DL_CLI
|
||||
foreach (string s in Global.GetFiles(DownDir + "\\Part_0", ".ts"))
|
||||
{
|
||||
//跳过有MAP的情况
|
||||
if (!File.Exists(DownDir + "\\Part_0\\!MAP.ts") && !FFmpeg.CheckMPEGTS(s))
|
||||
if (!isVTT && !File.Exists(DownDir + "\\Part_0\\!MAP.ts") && !FFmpeg.CheckMPEGTS(s))
|
||||
{
|
||||
//转换
|
||||
LOGGER.PrintLine("将文件转换到 MPEG-TS 封装:" + Path.GetFileName(s));
|
||||
@@ -558,7 +558,7 @@ namespace N_m3u8DL_CLI
|
||||
foreach (string s in Global.GetFiles(DownDir, ".ts"))
|
||||
{
|
||||
//跳过有MAP的情况
|
||||
if (!File.Exists(DownDir + "\\!MAP.ts") && !FFmpeg.CheckMPEGTS(s))
|
||||
if (!isVTT && !File.Exists(DownDir + "\\!MAP.ts") && !FFmpeg.CheckMPEGTS(s))
|
||||
{
|
||||
//转换
|
||||
LOGGER.PrintLine("将文件转换到 MPEG-TS 封装:" + Path.GetFileName(s));
|
||||
|
@@ -30,8 +30,8 @@ namespace N_m3u8DL_CLI
|
||||
|
||||
|
||||
/*===============================================================================*/
|
||||
static string nowVer = "2.4.5";
|
||||
static string nowDate = "20191218";
|
||||
static string nowVer = "2.4.8";
|
||||
static string nowDate = "20200131";
|
||||
public static void WriteInit()
|
||||
{
|
||||
Console.Clear();
|
||||
|
@@ -111,6 +111,9 @@ namespace N_m3u8DL_CLI
|
||||
if (m3u8Content.Contains("qiqiuyun.net/") || m3u8Content.Contains("aliyunedu.net/") || m3u8Content.Contains("qncdn.edusoho.net/")) //气球云
|
||||
isQiQiuYun = true;
|
||||
|
||||
if (M3u8Url.Contains("tlivecloud-playback-cdn.ysp.cctv.cn") && M3u8Url.Contains("endtime="))
|
||||
isEndlist = true;
|
||||
|
||||
//输出m3u8文件
|
||||
File.WriteAllText(m3u8SavePath, m3u8Content);
|
||||
|
||||
@@ -210,10 +213,10 @@ namespace N_m3u8DL_CLI
|
||||
segments = (JArray)parts[parts.Count - 1];
|
||||
parts.RemoveAt(parts.Count - 1);
|
||||
hasAd = false;
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
//常规情况的#EXT-X-DISCONTINUITY标记,新建part
|
||||
if (!hasAd && segments.Count > 1)
|
||||
if (!hasAd && segments.Count > 1)
|
||||
{
|
||||
parts.Add(segments);
|
||||
segments = new JArray();
|
||||
@@ -225,7 +228,7 @@ namespace N_m3u8DL_CLI
|
||||
else if (line.StartsWith(HLSTags.ext_x_version)) ;
|
||||
else if (line.StartsWith(HLSTags.ext_x_allow_cache)) ;
|
||||
//解析KEY
|
||||
else if (line.StartsWith(HLSTags.ext_x_key) && string.IsNullOrEmpty(keyFile) && string.IsNullOrEmpty(keyBase64))
|
||||
else if (line.StartsWith(HLSTags.ext_x_key) && string.IsNullOrEmpty(keyFile) && string.IsNullOrEmpty(keyBase64))
|
||||
{
|
||||
m3u8CurrentKey = ParseKey(line);
|
||||
//存储为上一行的key信息
|
||||
@@ -276,7 +279,10 @@ namespace N_m3u8DL_CLI
|
||||
if (Global.GetTagAttribute(line, "TYPE") == "AUDIO")
|
||||
MEDIA_AUDIO.Add(Global.GetTagAttribute(line, "GROUP-ID"), CombineURL(BaseUrl, Global.GetTagAttribute(line, "URI")));
|
||||
if (Global.GetTagAttribute(line, "TYPE") == "SUBTITLES")
|
||||
MEDIA_SUB.Add(Global.GetTagAttribute(line, "GROUP-ID"), CombineURL(BaseUrl, Global.GetTagAttribute(line, "URI")));
|
||||
{
|
||||
if (!MEDIA_SUB.ContainsKey(Global.GetTagAttribute(line, "GROUP-ID")))
|
||||
MEDIA_SUB.Add(Global.GetTagAttribute(line, "GROUP-ID"), CombineURL(BaseUrl, Global.GetTagAttribute(line, "URI")));
|
||||
}
|
||||
}
|
||||
else if (line.StartsWith(HLSTags.ext_x_playlist_type)) ;
|
||||
else if (line.StartsWith(HLSTags.ext_i_frames_only))
|
||||
@@ -312,7 +318,7 @@ namespace N_m3u8DL_CLI
|
||||
else if (expectSegment)
|
||||
{
|
||||
segUrl = CombineURL(BaseUrl, line);
|
||||
if (M3u8Url.Contains("akamaized.net") && M3u8Url.Contains("?__gda__"))
|
||||
if (M3u8Url.Contains("?__gda__"))
|
||||
{
|
||||
segUrl += new Regex("\\?__gda__.*").Match(M3u8Url).Value;
|
||||
}
|
||||
@@ -342,7 +348,7 @@ namespace N_m3u8DL_CLI
|
||||
{
|
||||
string listUrl;
|
||||
listUrl = CombineURL(BaseUrl, line);
|
||||
if (M3u8Url.Contains("akamaized.net") && M3u8Url.Contains("?__gda__"))
|
||||
if (M3u8Url.Contains("?__gda__"))
|
||||
{
|
||||
listUrl += new Regex("\\?__gda__.*").Match(M3u8Url).Value;
|
||||
}
|
||||
|
@@ -5,7 +5,9 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
@@ -213,6 +215,13 @@ namespace N_m3u8DL_CLI.NetCore
|
||||
/// - 修复part大于1时读取json混流文件的严重错误
|
||||
/// - 自动去除优酷的广告分片及前情提要
|
||||
/// - 修复腾讯视频HDR10视频下载合并异常问题
|
||||
/// 2020年1月26日
|
||||
/// - 在央视频回看链接且有endtime参数的情况下,不识别为直播流
|
||||
/// 2020年1月29日
|
||||
/// - 修复识别大师列表的bug (多个字幕同一个GROUP-ID)
|
||||
/// - 修复vtt字幕无法正常合并的bug
|
||||
/// 2020年1月31日
|
||||
/// - ?__gda__行为优化
|
||||
/// </summary>
|
||||
///
|
||||
|
||||
@@ -242,9 +251,17 @@ namespace N_m3u8DL_CLI.NetCore
|
||||
return false;
|
||||
}
|
||||
|
||||
private static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
SetConsoleCtrlHandler(cancelHandler, true);
|
||||
ServicePointManager.ServerCertificateValidationCallback = ValidateServerCertificate;
|
||||
|
||||
try
|
||||
{
|
||||
//goto httplitsen;
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user