Question How to get the howl html document not just the source code ??

zola320

Member
Joined
Apr 15, 2012
Messages
7
Programming Experience
Beginner
So guys Im now working 5 days on solving this problem. I need to get some inner text from a div witch is not visible in the source code. Someone any idea how to get him? Here is what I have until now



Code:
Dim doc As New HtmlAgilityPack.HtmlDocument
        Dim web As New HtmlWeb

     
        doc = web.Load("http://openbook.etoro.com/[FONT=monospace]ahanit[/FONT]/#/profile/Trades/")

        Dim nodes As HtmlNode = doc.GetElementbyId("feed-items")

        Dim id As String = nodes.WriteTo()
        TextBox1.Text = TextBox1.Text & vbCrLf & id
Seems the problem is the web.load it returns only the source code ?

Thank youu
 
Last edited:

SLPx

Member
Joined
Apr 2, 2012
Messages
17
Location
Sri Lanka
Programming Experience
5-10
Try with webbrowser control or HTMLWindow elements

If your web has Frames or Java Scripts, this wont help i guess
 

zola320

Member
Joined
Apr 15, 2012
Messages
7
Programming Experience
Beginner
When i use web browser control i get java script errors and the content that i need is not displayed. hmmm

Tnx
 

nK0de

Active member
Joined
Jan 20, 2012
Messages
42
Location
Colombo, Sri Lanka
Programming Experience
1-3
As far as I know, the Webbrowser control doesn't run Javascripts.
 

SLPx

Member
Joined
Apr 2, 2012
Messages
17
Location
Sri Lanka
Programming Experience
5-10
It executes, However it depends with the internet settings in the IE at control panel.And @zola320, if you can express your target here in your web url, might express more


The hidden thing is, you cannot retrieve all its content (the dynamic HTML) by the document property.
The webbrowser.document will refer to the initial HTML code and not the subsequent amendment or dynamic HTML rendered by java scripts


Between, if the web site uses such,
you need to go through the frames, iframes objects, domdocument object etc, to use the updated web site with java script.
 
Last edited:

zola320

Member
Joined
Apr 15, 2012
Messages
7
Programming Experience
Beginner
Thank you guys but seems that somehow uninstalling and installing again vs2010 solved my problems i can know use browser control as before and get the text i need. :) lucky I. Thank you again for all the effort :)
 
Top Bottom