Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42220

VS 2010 Noob need help retrieving info from website (youtube)

$
0
0
Hey

Here is a picture of the string i want to retrieve in the code:
Attachment 96767

How can i retrieve this? (The "1-10 of 1151" part)

Found this code in a different thread but i didn't get it to work. Was an error on the "td.Parent.NextSibling.InnerText" part.
Code:

Dim wc1 As New Net.WebClient
        Dim s = wc1.DownloadString("http://www.youtube.com/user/PewDiePie/featured")
        Dim wbs As New WebBrowser With {.DocumentText = "", .ScriptErrorsSuppressed = True}
        wbs.Document.Write(s)
        Dim td As HtmlElement = CType((From tr In wbs.Document.GetElementsByTagName("h2") Where CType(tr, HtmlElement).InnerText.Contains("Uploaded videos")).FirstOrDefault, HtmlElement)
        My.Settings.VideosTotal = td.Parent.NextSibling.InnerText

(The website mentioned in the code is the same as i want to retrieve the info from).

Thanks for any help :)
Attached Images
 

Viewing all articles
Browse latest Browse all 42220

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>