From 08224774c335404244966778eb30bc6b23abef38 Mon Sep 17 00:00:00 2001 From: croire <1432593898@qq.com> Date: Thu, 17 Mar 2022 00:08:51 +0800 Subject: [PATCH] =?UTF-8?q?aria=E6=9C=8D=E5=8A=A1=E5=99=A8=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0UserAgent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DownKyi.Core/Aria2cNet/Client/Entity/AriaSendData.cs | 4 ++-- DownKyi/Services/Download/AriaDownloadService.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DownKyi.Core/Aria2cNet/Client/Entity/AriaSendData.cs b/DownKyi.Core/Aria2cNet/Client/Entity/AriaSendData.cs index ffbe89a..0bcc88f 100644 --- a/DownKyi.Core/Aria2cNet/Client/Entity/AriaSendData.cs +++ b/DownKyi.Core/Aria2cNet/Client/Entity/AriaSendData.cs @@ -42,8 +42,8 @@ namespace DownKyi.Core.Aria2cNet.Client.Entity //[JsonProperty("use-head")] //public string UseHead { get; set; } - //[JsonProperty("user-agent")] - //public string UserAgent { get; set; } + [JsonProperty("user-agent")] + public string UserAgent { get; set; } public override string ToString() { diff --git a/DownKyi/Services/Download/AriaDownloadService.cs b/DownKyi/Services/Download/AriaDownloadService.cs index b8c566e..ff5d656 100644 --- a/DownKyi/Services/Download/AriaDownloadService.cs +++ b/DownKyi/Services/Download/AriaDownloadService.cs @@ -979,10 +979,10 @@ namespace DownKyi.Services.Download { //HttpProxy = $"http://{Settings.GetAriaHttpProxy()}:{Settings.GetAriaHttpProxyListenPort()}", Dir = path, - Out = localFileName - //Header = $"cookie: {Login.GetLoginInfoCookiesString()}\nreferer: https://www.bilibili.com", + Out = localFileName, + //Header = $"cookie: {LoginHelper.GetLoginInfoCookiesString()}\nreferer: https://www.bilibili.com", //UseHead = "true", - //UserAgent = Utils.GetUserAgent() + UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36", }; // 如果设置了代理,则增加HttpProxy