Skip to content

Commit

Permalink
nmb is best
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovler-Young committed Oct 23, 2022
1 parent f0a0bab commit 6fac929
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions AdnmbBackup-gui/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ private void button1_Click(object sender, EventArgs e)
string path = Path.Combine(DateTime.Now.Month.ToString() + "-" + DateTime.Now.Day.ToString(), id + ".json");
try
{
string url = "https://nmb.fastmirror.org/Api/thread";
string url = "https://api.nmb.best/Api/thread";
var cookie = File.ReadAllText("cookie.txt");
CookieContainer cookieContainer = new CookieContainer();
cookieContainer.Add(new Cookie("userhash", cookie, "/", "nmb.fastmirror.org"));
cookieContainer.Add(new Cookie("userhash", cookie, "/", "api.nmb.best"));
HttpClientHandler handler = new HttpClientHandler() { UseCookies = true };
handler.CookieContainer = cookieContainer;
HttpClient http = new HttpClient(handler);
http.DefaultRequestHeaders.Add("Host", "nmb.fastmirror.org");
http.DefaultRequestHeaders.Add("Host", "api.nmb.best");
http.DefaultRequestHeaders.Add("Accept", "application/json");
http.DefaultRequestHeaders.Add("Accept-Encoding", "gzip");
http.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.0.0 Safari/537.36");
Expand Down Expand Up @@ -112,7 +112,7 @@ private void button1_Click(object sender, EventArgs e)

private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("https://github.com/ColdThunder11/AdnmbBackup-gui");
System.Diagnostics.Process.Start("https://github.com/Ovler-Young/AdnmbBackup-gui");
}
static void ConvertToText(string path)
{
Expand Down Expand Up @@ -202,13 +202,13 @@ private void Form1_Shown(object sender, EventArgs e)
{
string path = Path.Combine(DateTime.Now.Month.ToString() + "-" + DateTime.Now.Day.ToString(), id + ".json");
if (File.Exists(path)) continue;
string url = "https://nmb.fastmirror.org/Api/thread";
string url = "https://api.nmb.best/Api/thread";
CookieContainer cookieContainer = new CookieContainer();
cookieContainer.Add(new Cookie("userhash", cookie, "/", "nmb.fastmirror.org"));
cookieContainer.Add(new Cookie("userhash", cookie, "/", "api.nmb.best"));
HttpClientHandler handler = new HttpClientHandler() { UseCookies = true };
handler.CookieContainer = cookieContainer;
HttpClient http = new HttpClient(handler);
http.DefaultRequestHeaders.Add("Host", "nmb.fastmirror.org");
http.DefaultRequestHeaders.Add("Host", "api.nmb.best");
http.DefaultRequestHeaders.Add("Accept", "application/json");
http.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36 HavfunClient-AdnmbBackup");
label4.Text = ">>" + id + " 正在获取第1页";
Expand Down

0 comments on commit 6fac929

Please sign in to comment.