public async void LoadData()
{
//Getting of data
var httpClient = new HttpClient();
var strHtml = await httpClient.GetStringAsync("https://myspace.com/discover/people");
// Http Agility Pack
var htmlDoc = new HtmlDocument();
htmlDoc.LoadHtml(strHtml);
var newsListNodeHtml = htmlDoc.GetElementbyId("browse-people");
if (newsListNodeHtml != null)
{
var newsListNodes = newsListNodeHtml.Descendants("div").Where(x => x.Attributes != null && x.Attributes["class"].Value == "profile item quarter");
if (newsListNodes != null)
{
foreach (var newsListNode *in newsListNodes*)
{
//get title
var listTitle = newsListNode.Descendants("a").FirstOrDefault(x => x.Attributes != null && x.Attributes["class"].Value == "image link cover");
if (listTitle != null)
{
var photo = listTitle.GetAttributeValue("style", "");
}
}
}
else
return;
}
else
return;
}
When debug it's just playing to here "in newsListNodes" and then broken out. No,It don't any show error out, haven't anything. And I want to get this url__https://a3-images.myspacecdn.com/images04/1/f02b02801b37483badddeb46d5206c54/300x300.jpg__
from
<a href="/Ana-Tole" class="image link cover" style="background-image: url('https://a3-images.myspacecdn.com/images04/1/f02b02801b37483badddeb46d5206c54/300x300.jpg')">>
How do getting?