public async Task GetRemoteSeries() { List <RemoteSeries> remoteSeries = new List <RemoteSeries>(); string str = await _remote.GetRemoteSeries().ConfigureAwait(false); var doc = new HtmlDocument(); doc.LoadHtml(str); var nodes = doc.DocumentNode.SelectNodes("//select") .Where(select => select.Attributes["name"].Value == "qsShow") .SelectMany(y => y.Descendants("option")) .ToList(); foreach (HtmlNode htmlNode in nodes) { remoteSeries.Add(new RemoteSeries { Id = htmlNode.GetAttributeValue("value", -1), Name = htmlNode.InnerText, }); } // Clean fake Id remoteSeries.RemoveAll(s => s.Id < 1); _cache.Save(remoteSeries); }