I'm trying to scrape a website with xmlhttp and VBA.
The Url has a hash(#) symbol and is misinterpreted by VBA...
This is the same problem as explained here :
Error in XMLHTTP Get request with Special character in URL
The code is as follow :
Sub webscraping()
Dim x As String
Dim req As MSXML2.XMLHTTP60
Dim doc As HTMLDocument
x = "https://search.gleif.org/#/search/"
Set req = New MSXML2.XMLHTTP60
With req
.Open "GET", x, False
.send
If .Status <> 200 Then
MsgBox "Http Request Error"
Exit Sub
End If
Set doc = New MSHTML.HTMLDocument
doc.body.innerHTML = .responseText
End With
End Sub
Thank you in advance