You've already forked N_m3u8DL-CLI
mirror of
https://github.com/nilaoda/N_m3u8DL-CLI
synced 2025-09-07 02:45:59 +02:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bc349b8977 | ||
![]() |
cc4efed3c6 | ||
![]() |
cf958e833b | ||
![]() |
fb09add0cd | ||
![]() |
5a3c5baefd | ||
![]() |
839afd8e61 | ||
![]() |
338c7a25d0 | ||
![]() |
f57ce8c2da |
@@ -30,8 +30,8 @@ namespace N_m3u8DL_CLI
|
||||
|
||||
|
||||
/*===============================================================================*/
|
||||
static string nowVer = "2.4.0";
|
||||
static string nowDate = "20191024";
|
||||
static string nowVer = "2.4.2";
|
||||
static string nowDate = "20191216";
|
||||
public static void WriteInit()
|
||||
{
|
||||
Console.Clear();
|
||||
@@ -77,6 +77,16 @@ namespace N_m3u8DL_CLI
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetValidFileName(string input, string re = ".")
|
||||
{
|
||||
string title = input;
|
||||
foreach (char invalidChar in Path.GetInvalidFileNameChars())
|
||||
{
|
||||
title = title.Replace(invalidChar.ToString(), re);
|
||||
}
|
||||
return title;
|
||||
}
|
||||
|
||||
// parseInt(s, radix)
|
||||
public static int GetNum(string str, int numBase)
|
||||
{
|
||||
@@ -100,7 +110,8 @@ namespace N_m3u8DL_CLI
|
||||
if (url.Contains("pcvideo") && url.Contains(".titan.mgtv.com"))
|
||||
{
|
||||
webRequest.UserAgent = "";
|
||||
webRequest.Referer = "https://player.mgtv.com/mgtv_v6_player/PlayerCore.swf";
|
||||
if (!url.Contains("/internettv/"))
|
||||
webRequest.Referer = "https://player.mgtv.com/mgtv_v6_player/PlayerCore.swf";
|
||||
webRequest.Headers.Add("Cookie", "MQGUID");
|
||||
}
|
||||
//添加headers
|
||||
@@ -482,7 +493,8 @@ namespace N_m3u8DL_CLI
|
||||
else if (url.Contains("pcvideo") && url.Contains(".titan.mgtv.com"))
|
||||
{
|
||||
request.UserAgent = "";
|
||||
request.Referer = "https://player.mgtv.com/mgtv_v6_player/PlayerCore.swf";
|
||||
if (!url.Contains("/internettv/"))
|
||||
request.Referer = "https://player.mgtv.com/mgtv_v6_player/PlayerCore.swf";
|
||||
request.Headers.Add("Cookie", "MQGUID");
|
||||
}
|
||||
else
|
||||
|
@@ -39,9 +39,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.JScript" />
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\..\HDC上传助手\HDC上传助手\bin\Debug\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Collections" />
|
||||
|
@@ -203,6 +203,10 @@ namespace N_m3u8DL_CLI.NetCore
|
||||
/// - 增加disableIntegrityCheck选项
|
||||
/// 2019年10月24日
|
||||
/// - 捕获Ctrl+C退出,移动光标到正确位置
|
||||
/// 2019年11月30日
|
||||
/// - 完善芒果TV请求头的自动添加
|
||||
/// 2019年12月16日
|
||||
/// - 处理文件名特殊字符
|
||||
/// </summary>
|
||||
///
|
||||
|
||||
@@ -392,7 +396,7 @@ namespace N_m3u8DL_CLI.NetCore
|
||||
}
|
||||
if (arguments.Has("--saveName"))
|
||||
{
|
||||
fileName = arguments.Get("--saveName").Next;
|
||||
fileName = Global.GetValidFileName(arguments.Get("--saveName").Next);
|
||||
}
|
||||
if (arguments.Has("--useKeyFile"))
|
||||
{
|
||||
|
@@ -41,7 +41,7 @@
|
||||
|
||||
# 命令行选项
|
||||
```
|
||||
N_m3u8DL-CLI.exe <URL|File|JSON> [OPTIONS]
|
||||
N_m3u8DL-CLI.exe <URL|JSON|FILE> [OPTIONS]
|
||||
|
||||
--workDir Directory 设定程序工作目录
|
||||
--saveName Filename 设定存储文件名(不包括后缀)
|
||||
@@ -52,6 +52,8 @@ N_m3u8DL-CLI.exe <URL|File|JSON> [OPTIONS]
|
||||
--retryCount Count 设定程序的重试次数(默认为15)
|
||||
--timeOut Sec 设定程序网络请求的超时时间(单位为秒,默认为10秒)
|
||||
--muxSetJson File 使用外部json文件定义混流选项
|
||||
--useKeyFile File 使用外部16字节文件定义AES-128解密KEY
|
||||
--useKeyBase64 Base64String 使用Base64字符串定义AES-128解密KEY
|
||||
--downloadRange Range 仅下载视频的一部分分片或长度
|
||||
--stopSpeed Number 当速度低于此值时,重试(单位为KB/s)
|
||||
--maxSpeed Number 设置下载速度上限(单位为KB/s)
|
||||
@@ -63,6 +65,7 @@ N_m3u8DL-CLI.exe <URL|File|JSON> [OPTIONS]
|
||||
--disableDateInfo 关闭混流中的日期写入
|
||||
--noMerge 禁用自动合并
|
||||
--noProxy 不自动使用系统代理
|
||||
--disableIntegrityCheck 不检测分片数量是否完整
|
||||
```
|
||||
|
||||
# 用户文档
|
||||
|
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