Fixed ~ani and ~mang, searches might be off for some time
This commit is contained in:
parent
500e128d42
commit
d58ebd100f
@ -30,7 +30,8 @@ namespace NadekoBot.Modules.Searches
|
||||
{
|
||||
try
|
||||
{
|
||||
var headers = new Dictionary<string, string> {
|
||||
var headers = new Dictionary<string, string>
|
||||
{
|
||||
{"grant_type", "client_credentials"},
|
||||
{"client_id", "kwoth-w0ki9"},
|
||||
{"client_secret", "Qd6j4FIAi1ZK6Pc7N7V4Z"},
|
||||
@ -38,9 +39,10 @@ namespace NadekoBot.Modules.Searches
|
||||
|
||||
using (var http = new HttpClient())
|
||||
{
|
||||
http.AddFakeHeaders();
|
||||
//http.AddFakeHeaders();
|
||||
http.DefaultRequestHeaders.Clear();
|
||||
var formContent = new FormUrlEncodedContent(headers);
|
||||
var response = await http.PostAsync("http://anilist.co/api/auth/access_token", formContent).ConfigureAwait(false);
|
||||
var response = await http.PostAsync("https://anilist.co/api/auth/access_token", formContent).ConfigureAwait(false);
|
||||
var stringContent = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
anilistToken = JObject.Parse(stringContent)["access_token"].ToString();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user