http response text fetching incomplete html

怎甘沉沦 提交于 2019-12-02 02:33:11

Debug.Print and/or the immediate window have limitations. Nowhere documented however they have.

So try writing the webpageSource to a file:

Sub source()
    Dim oHttp As New WinHttp.WinHttpRequest
    Dim sURL As String
    Dim webpageSource As String
    sURL = "http://www.google.com"
    oHttp.Open "GET", sURL, False
    oHttp.send
    webpageSource = oHttp.ResponseText

    Set FSO = CreateObject("Scripting.FileSystemObject")
    Set oFile = FSO.CreateTextFile("webpageSource.txt")
    oFile.Write webpageSource
    oFile.Close

    Shell "cmd /C start webpageSource.txt"

End Sub

Does the file contain all content?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!