Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>To try to help out other people that looking at this same issue ... I have been screen scraping stock data for many years. I like to see the web page that is being scraped since it makes it much easier to debug.<br> I run Windows 7 64 bit, Visual Studio 2010. When my computer automatically changed to IE9 - I started having a lot of problems with code that had been running for many years. The code in VB.NET is like:</p> <pre><code>Public WithEvents MyExplorer As SHDocVw.InternetExplorer MyExplorer.Navigate("SomeURL") While (MyExplorer.ReadyState &lt;&gt; SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE) Application.DoEvents() Thread.Sleep(500) End While Dim strHtml As String strHtml = MyExplorer.Document.DocumentElement.innerHTML.Replace("&amp;amp;", "&amp;").replace("&amp;nbsp;", " ") </code></pre> <p>I have had to make two significant changes since IE9 came out: 1. MyExplorer.ReadyState &lt;> SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE 2. MyExplorer.Document.DocumentElement.innerHTML</p> <p>In the first case I was doing something like While (MyExplorer.Document.readyState &lt;> "complete") that no longer seems to work reliably. I changed to: While (MyExplorer.ReadyState &lt;> SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE) which seems more reliable</p> <p>In the second case I was getting the HTML of the web page by using: MyExplorer.Document.documentElement.innerhtml I kept getting exceptions that although MyExplorer.ReadyState was complete - documentElement was null (or DBNull). The interesting part was that in Intellisense and "Local Variables" of Visual Studio - I could see documentElement and innerhtml.<br> Based on what I saw in one answer above - I simply changed the capitalization of DocumentElement and it now seems to work reliably.<br> The huge advantage of VB.NET is that it is suppose to be case insensitive ...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload