Hello, i'd like to know how i could extract specific information from websites like Twitch using HtmlAgilityPack.
For example lets use this random channel:
http://www.twitch.tv/grossie_gore
I would like to extract channel_viewer_count, views_count and followers_count.
Right now i have this:
The problem is that it only extracts the last value
Also, what are ChildNodes and how to use them?
For example lets use this random channel:
http://www.twitch.tv/grossie_gore
I would like to extract channel_viewer_count, views_count and followers_count.
HTML Code:
</SPAN> <A class="dropdown_static action" id="button_share"
href=""><SPAN>Share</SPAN></A> <A class="dropdown_glyph action" id="button_options"
href=""><SPAN>Options</SPAN></A> </DIV>
<DIV id="channel_stats"><SPAN class="stat" id="channel_viewer_count"
original-title="Watching Now">1,608</SPAN> <SPAN class="stat" id="views_count"
original-title="Channel Views">1,728,160</SPAN> <SPAN class="stat" id="followers_count"
original-title="Followers">17,768</SPAN> </DIV></DIV>Code:
Dim site As HtmlAgilityPack.HtmlWeb = New HtmlWeb()
Dim document As HtmlAgilityPack.HtmlDocument = site.Load("http://www.twitch.tv/grossie_gore")
For Each table As HtmlNode In document.DocumentNode.SelectNodes("//span[@class='stat']")
TextBox3.Text = (table.InnerText)
NextHTML Code:
SPAN class="stat" id="followers_count"