mirror of
https://github.com/yaobiao131/downkyicore.git
synced 2025-08-10 00:52:31 +00:00
feat: 修改referer和origin为移动端,目前测试是可以减少风控。未经详细测试
This commit is contained in:
@@ -205,7 +205,7 @@ public static class VideoStream
|
||||
/// <returns></returns>
|
||||
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
|
||||
|
||||
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user