Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

web query returns different page than browser

$
0
0

I have been using a Excel web query to download yahoo option data. Recently the yahoo option table data has changed.  Now when I open the Yahoo web page in Excel either with my vba code or with the "Web Query" I get a different web page than if I open the page in my browser. 

Why would I get a different web page from yahoo using the web query?

Web Query

Web page in Browser

                  

Sub GetYahoo()

    Dim url As String, YahooHtml As String
    Dim HttpObj As MSXML2.XMLHTTP60

    url = "https://finance.yahoo.com/q/op?s=ABX&date=1415318400"

    Set HttpObj = New MSXML2.XMLHTTP60
    HttpObj.Open "GET", url, False
    HttpObj.Send

    While HttpObj.readyState <> 4
            DoEvents
    Wend

    YahooHtml = HttpObj.responseText

End Sub


Viewing all articles
Browse latest Browse all 11829

Trending Articles



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