Hi Friends,
I had to rewrite this post because it didn't submit for whatever reason (very frustrating!). LOL
Anyway, I'm trying to analyze web pages for seo. I'm trying to create my own personal tool to extract all the keywords and tags from web pages (a little clearer).
I already know how to extract or parse links and text from web pages. The issue is that I tried to implement title tags, body tags or keyword tags in general via using the following code:
Dim theElementCollection As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("a")
For Each curElement As HtmlElement In theElementCollection
If curElement.GetAttribute("href").Contains("http://twitter.com/") Then
TextBox2.Text += curElement.GetAttribute("innerText") & vbCrLf
End If
Next
The above code extracts the innertext of any given href link, but I have tried a variety of ways to implement the extraction of keywords from web pages. It won't do a thing!
So I would like to know if someone could give an example to extract title tags, keyword tags, metatags or anything would be appreciated.
For example:
Try to extract all the keywords from the title, body etc. for this page:
http://www.tradebit.com/filedetail.php/5006461-ultimate-zaytoven-kit and send it to separate textboxes (title keywords in textbox1, meta tags in textbox2 etc.).
This is what I'm trying to do based on the code I gave above, but please try to give an example.
Thanks!