diff --git a/DownKyi.Core/BiliApi/VideoStream/VideoStream.cs b/DownKyi.Core/BiliApi/VideoStream/VideoStream.cs index 55227ee..59f1974 100644 --- a/DownKyi.Core/BiliApi/VideoStream/VideoStream.cs +++ b/DownKyi.Core/BiliApi/VideoStream/VideoStream.cs @@ -205,7 +205,7 @@ public static class VideoStream /// private static PlayUrl GetPlayUrl(string url) { - string referer = "https://www.bilibili.com"; + string referer = "https://m.bilibili.com"; string response = WebClient.RequestWeb(url, referer); try diff --git a/DownKyi.Core/BiliApi/WebClient.cs b/DownKyi.Core/BiliApi/WebClient.cs index 9f03a7f..0c5f162 100644 --- a/DownKyi.Core/BiliApi/WebClient.cs +++ b/DownKyi.Core/BiliApi/WebClient.cs @@ -66,7 +66,7 @@ internal static class WebClient // 构造cookie if (!url.Contains("getLogin")) { - request.Headers["origin"] = "https://www.bilibili.com"; + request.Headers["origin"] = "https://m.bilibili.com"; CookieContainer cookies = LoginHelper.GetLoginInfoCookies(); if (cookies != null) @@ -75,6 +75,8 @@ internal static class WebClient } } + request.Proxy = new WebProxy("http://localhost:8080"); + string html = string.Empty; using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) {