YasserKhalil
Well-Known Member
Hello everyone
I am still confused of using XMLHTTP approach ..
For example in this code I have exported the html to text file
But when navigating to the url and right click >> View Source :: I found it different from this in the text file
Can you explain why and how to get the same as View Source html page?
I am still confused of using XMLHTTP approach ..
For example in this code I have exported the html to text file
Code:
Sub Test()
Dim html As Object
Dim f As Integer
With CreateObject("MSxml2.XMLHTTP")
.Open "GET", "https://www.martialartsschoolsdirectory.com/united-states?page=1", False
.send
Set html = CreateObject("htmlfile")
html.body.innerHTML = .responseText
End With
f = FreeFile()
Open ThisWorkbook.Path & "\Sample.txt" For Output As #f
Print #f, html.body.innerHTML
Close #f
End Sub
But when navigating to the url and right click >> View Source :: I found it different from this in the text file
Can you explain why and how to get the same as View Source html page?