public static async void AuthenticateLogin(string data) { try { string token = CloudStreamCore.FindHTML(data + "&", "access_token=", "&"); string expires_in = CloudStreamCore.FindHTML(data + "&", "expires_in=", "&"); Settings.AniListTokenUnixTime = CloudStreamCore.UnixTime + int.Parse(expires_in); Settings.AniListToken = token; await GetUser(); App.SaveData(); App.ShowToast("Login complete"); } catch (Exception) { App.ShowToast("Login failed"); } }
static string FindString(string line, string data) { return(CloudStreamCore.FindHTML(line, $"{data}[", "]")); }